hey i have inserted a feedback form into my webpage www.werun2win.com/contact it send me the email when you fill it in fine but when you click subit buttin you get redirected to www.werun2win.com/feedbackform.php which is not what i told it to do i said to redirect the person to a thankyou page i have made.. www.werun2win.com/thankyou so what i wrong :S bellow is the php script i added to my directory on my host server */ // ------------- CONFIGURABLE SECTION ------------------------ // $mailto - set to the email address you want the form // sent to, eg //$mailto = "youremailaddress@example.com" ; $mailto = 'contact@werun2win.com' ; // $subject - set to the Subject line of the email, eg //$subject = "Feedback Form" ; $subject = "werun2win.com" ; // the pages to be displayed, eg //$formurl = "" ; //$errorurl = "" ; //$thankyouurl = "" ; $formurl = "http://www.werun2win.com/contact.html" ; $errorurl = "http://www.werun2win.com/error.html" ; $thankyouurl = "http://www.werun2win.com/thanks.html" ; $uself = 0; // -------------------- END OF CONFIGURABLE SECTION --------------- $headersep = (!isset( $uself ) || ($uself == 0)) ? "\r\n" : "\n" ; $name = $_POST['name'] ; $email = $_POST['email'] ; $comments = $_POST['comments'] ; $http_referrer = getenv( "HTTP_REFERER" ); if (!isset($_POST['email'])) { header( "Location: $formurl" ); exit ; } if (empty($name) || empty($email) || empty($comments)) { header( "Location: $errorurl" ); exit ; } if ( ereg( "[\r\n]", $name ) || ereg( "[\r\n]", $email ) ) { header( "Location: $errorurl" ); exit ; } if (get_magic_quotes_gpc()) { $comments = stripslashes( $comments ); } $messageproper = "This message was sent from:\n" . "$http_referrer\n" . "------------------------------------------------------------\n" . "Name of sender: $name\n" . "Email of sender: $email\n" . "------------------------- COMMENTS -------------------------\n\n" . $comments . "\n\n------------------------------------------------------------\n" ; mail($mailto, $subject, $messageproper, "From: \"$name\" <$email>" . $headersep . "Reply-To: \"$name\" <$email>" . $headersep . "X-Mailer: chfeedback.php 2.07" ); header( "Location: $thankyouurl" ); exit ; ?>