View Full Version : feedback form

10-04-2004, 12:22 PM
I have a feedback form(feedback.php) which fires a mail function.
After successful firing of mail it shows a javascript alert
"tahnk you" and redirected to a new page.

but when i press back the same javascript alert appears fires the same mail and what i don't want.
plz help me.thanx in advance.

sir pannels
10-04-2004, 01:08 PM
Hey there,

from my understanding.. in most browser .. pressing the back button will run the form again - meaning it sending the feedback again.

A nasty way round this would be to put in some code that reconises if the page has already been loaded..or maybe even flood control?

10-05-2004, 04:41 PM
can u help me by giving some examples(code).
thanx in advance

sir pannels
10-06-2004, 02:07 PM
use the $HTTP_REFER variable to call the refering address and on your form page put something like

if $http_refer = form_completepage.html
{ echo(" You have pressed the back button") };
else { echo ("YOUR HTML FORM HERE"); }