hi i would like to know how i can stop multiple form insertion. What i mean is after you submit a form if you refresh the browser sends the script again. I done this with the header() function to resend the user but i also need to show a message saying the data was inserted successfully. I used a session but i don't know how to unset it correctly so when the user refreshes the message goes away. If anyone knows another way or a way i can remove the session after the message has been shown please let me know, thanks.
nick3592
0
Light Poster
Recommended Answers
Jump to PostYou *shouldn't* send data to the same page. We all (well I do) do it when prototyping, but your data should be sent to form handling page, where it will be processed. Depending on the result of said processing a redirect is then initiated taking you to a specific page …
Jump to Postplace session_start() at the very start of every page.
All 6 Replies
diafol
nick3592
0
Light Poster
diafol
david.sichizya
0
Newbie Poster
almostbob
866
Retired: passive income ROCKS
diafol
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.