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.
Jump to Post
You *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 …
All 6 Replies
We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.