CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 how to prevent data submission on page refresh.

Print topic Send  topic

Author Message
tateibra

Posts: 7
Posted: 02/25/2016, 11:23 PM

I have a record where by i add hidden textfield token to prevent csrf, and i have use two event before show and befor insert, they are working fine but when i submit data , they are submitted but also remain in the form so when you refresh a page they are submitted again, so i ask a help hoe i can prevent resubmission on page refresh.
View profile  Send private message
eratech


Posts: 513
Posted: 02/27/2016, 9:51 PM

Hi tateibra,

I'm not sure I understand - you have the hidden fields and they are (correctly) submitted with the rest of the form - but as you found, page refresh will create them again as part of the form.

When would you want the hidden token field Not to be submitted, if they are part of the security of the form?

Thanks

Eric


_________________
CCS 3/4/5 ASP Classic, VB.NET, PHP
Melbourne, Victoria, Australia
View profile  Send private message
tateibra

Posts: 7
Posted: 03/07/2016, 12:00 AM

hellow eratech,
i have solved already, what i wanted was to prevent cross site forgering request on each form in my web app, so i used after insert instead of on validate event for validation thus why, after submission the data input remain on a form, so may cause user to resubmit again.
View profile  Send private message
eratech


Posts: 513
Posted: 03/07/2016, 3:12 AM

Glad you solved it - E
_________________
CCS 3/4/5 ASP Classic, VB.NET, PHP
Melbourne, Victoria, Australia
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright 2003-2004 by UltraApps.com  and YesSoftware, Inc.