I was curious as to if there was a command that I could run from php that would close the window after the script runs.... I have this running from a formIf I can't close this window, how do I make it automatically redirect to another website. I tried before but it said headers already sent. Obviously, I'm not well versed in php..... I am learning on the fly......Code:<html> <head><title>HWHC Mail Sender</title></head> <body> <?php /* All form fields are automatically passed to the PHP script through the array $HTTP_POST_VARS. */ $email = "myemail@email.com"; $subject = "FMLA/LOA/STD REQUEST"; $message = "1 - Name - ".$HTTP_POST_VARS['name']."\n2 - What kind of leave - ".$HTTP_POST_VARS['leave']."\n3 - When does leave begin - ".$HTTP_POST_VARS['begin']."\n4 - When does leave end - ".$HTTP_POST_VARS['end']."\n5 - If intermittent when continuous - ".$HTTP_POST_VARS['intrmtnt']."\n6 - Location to pickup at - ".$HTTP_POST_VARS['location']."\n7 - What number to fax to - ".$HTTP_POST_VARS['fax']."\n8 - Whose attention - ".$HTTP_POST_VARS['attn']."\n9 - What address to mail to - ".$HTTP_POST_VARS['addr1']."- ".$HTTP_POST_VARS['addr2']."\n10 - What is the preferred delivery method - ".$HTTP_POST_VARS['send']."\n11 - Callback number - ".$HTTP_POST_VARS['phone']."\n12 - E-mail address - ".$HTTP_POST_VARS['email']; /* Sends the mail and outputs the "Thank you" string*/ if (mail($email,$subject,$message)) { echo "<h4>Thank you for sending email</h4>"; print( '<a href="http://www.mywebsite.com">Home</a>' ); } else { echo "<h4>Can't send email to $email</h4>"; } ?> </body> </html>



LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks