ade
2009-10-20 16:30:32 UTC
What I would like is for me to have a form where the user can enter say: name, email, phone number and a message, then have a submit button.
I can do this where after pressing submit you get sent to a separate php page that sends the email and then displays something on that seperate php page like "Thankyou for you message" with an o.k link that will return you to the original page.
What I would like to have happen though, is for the user to fill out the form, press submit and then just to have something like a little tick appear next to the submit button saying message sent. In other words, have the email processing happen on the same page.
I kind of got this working by including all the php on the same contact page. My only problem is that once the user clicks submit and their message is sent and a message appears by the form saying message sent...
if the user then refreshes the page, the form is sent again and I get two emails from the same user or i get an alert box telling me the form data will be resent. Annoying! Can I stop this resending of form data on page refresh?
Any advice or help would be great. Is there a better way of doing this?
Hope I made myself clear,
thanks