I want the thank page to be displayed for about second after the user has submit the form and then to go to another URL say, http://www.google.com. Below is the code:
[PHP]<?php
// $mailto - set to the email address you want the form
// sent to, eg
//$mailto = "youremailaddress@example.com" ;
$mailto = 'atiqisthebest@hotmail.com' ;
// $subject - set to the Subject line of the email, eg
//$subject = "Feedback Form" ;
//$subject = "Feedback by $name" ; ***MOVED to line 78***
// the pages to be displayed, eg
//$formurl = "http://www.example.com/feedback.html" ;
//$errorurl = "http://www.example.com/error.html" ;
//$thankyouurl = "http://www.example.com/thankyou.html" ;
$formurl = "http://miraj.atiq.eu/index.html" ;
$errorurl = "http://atiq.eu/error.html" ;
$thankyouurl = "http://miraj.atiq.eu/" ;
$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" );
$subject = "Feedback by $name" ;
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" ;
if(mail($mailto, $subject, $messageproper,
"From: \"$name\" <$email>" . $headersep . "Reply-To: \"$name\" <$email>" . $headersep . "X-Mailer: feedback.php 2.08" )
{
?>
<script language="javascript">
window.open ("thank.html","mywindow","location=1,status=0,scro llbars=0,width=400,height= 400");
</script>
<?
$thankyouurl = 'http://www.google.com';
echo '<meta http-equiv="refresh" content="5;url='.$thankyouurl.'">'
}
?>[/PHP]
When the contact form is processed i get the following error:
Parse error: parse error, unexpected '{' in e:\domains\m\miraj.atiq.eu\user\htdocs\feedback.ph p on line 110
Can someone help solve this problem...any help would be greatly appreciated!
Thanks