stop duplicate entry to db on refresh the page

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

zakia
New php-forum User
New php-forum User
Posts: 1
Joined: Thu Nov 01, 2012 3:23 am

stop duplicate entry to db on refresh the page

Postby zakia » Thu Nov 01, 2012 3:27 am

Stop to re enter data into db after refresh the browser
i used header (redirect to page ) but wen user press back button from browser and submit button is clicked data is entered again to db

mcs0801
New php-forum User
New php-forum User
Posts: 2
Joined: Thu Nov 01, 2012 5:28 am

Re: stop duplicate entry to db on refresh the page

Postby mcs0801 » Thu Nov 01, 2012 6:12 am

hmm well, You should put the file as process.php file in the form action attributes, in process.php file you have to put the query for insertion record, after you insertion query, redirect the page to thanks.html or other page where you want to go.when user will click on the back via browser , he will be able to show your form, he will not be able to execute the page as process.php file . That's it

Let me know if you find any issue .


Return to “PHP coding => General”

Who is online

Users browsing this forum: No registered users and 1 guest