Forum Moderators: coopster

Message Too Old, No Replies

secure formmail with PHP

anti flood formmail

         

leak_ngakak

7:40 am on Feb 7, 2003 (gmt 0)



i made a formmail on my site,but it's not secure like i want. somebody can flooding my formmail if they click back button on web browser than flooding my formmail with same message before, can anybody explain me..how to make secure formmail specially with PHP...thank you

jatar_k

8:13 am on Feb 7, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld leak_ngakak,

It doesn't sound like you are you using the actual formmail script. I assume you made this yourself and are wondering how to not have people sending 2 or 3 or more emails if they hit the back button and send again?

If you use sessions you could use a var to say that they already sent the email or you could cookie them with a value that the email was sent. You could not let them send another email for a certain time from the same IP.

There are a lot of different ways you could get around this. I am sure someone will even come tell you that some of these are too much work and have something easier as well. :)

seindal

8:57 am on Feb 7, 2003 (gmt 0)

10+ Year Member



Make sure your form submits to the script using action=POST, not action=GET. POST means there are sideeffects, like sending a mail, so if people use the back-button or tries to reload the page, they should get a warning.

René.