once the feedback is submitted the thank.html popups. however, i want this popup to only be displayed for 3 seconds and then for this window to automaticaly close it self. below is the code for thank.html
[HTML]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script language="javascript">
settimeout("window.close()",500)
</script> </head>
<body>
Thanks for your Feedback
</body>
</html>[/HTML]
here is the code for the feedback.php file:
[PHP]// ------------- CONFIGURABLE SECTION ------------------------
// $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.miraj.atiq.eu';
echo '<meta http-equiv="refresh" content="5;url='.$thankyouurl.'">';
}
?>[/PHP]
Any help would be greatly appreciated!
Thanks