|
PHP problem with a re-direct
I have a PHP-driven send mail script which gets its data from an HTML form
From what I can gather, the re-direct is not functioning properly
PROBLEM *** When the user clicks the submit button the browser's (any of them) URL window changes to the form's action (the PHP script)
All of the data submitted through the form is sent along with formatting It's just the user never gets re-directed.
I have made sure that all of the CMOD settings are set to 777
The funny thing is I originally wrote the script and it still works on the site I did it for a year ago.
Here's the code for the PHP script:
<?php
/************************************************** *\
* PHP 4.1.0+ version of email script.
\************************************************* **/
//
//
$sendTo = "user@AOL.com";
$subject = "Your request from Design";
//
//
$headers = "From: " . $_POST["companyname"];
$headers .= "<" . $_POST["email"] .">\r\n";
// next include a Reply-To:
$headers .= "Reply-To: " . $_POST["email"];
//
//
$message = $_POST["companyname"] ."\r\n";
$message .= $_POST["address"] ."\r\n";
$message .= $_POST["phone"] ."\r\n";
$message .= $_POST["email"] ."\r\n\n";
$message .= $_POST["message"];
//
//
$redirect = "thanks.html";
mail($sendTo, $subject, $message, $headers);
?>
Here's the form code snippet:
<form action="phpmail.php" method="post" enctype="multipart/form-data" name="form1">
<p>
<input name="companyname" type="text" id="companyname4">
Company Name*</p>
<p>
<input name="address" type="text" id="address4">
Address
<input type=hidden name="redirect" value="thanks.html">
</p>
<p>
<input name="phone" type="text" id="phone4">
Phone</p>
<p>
<input name="email" type="text" id="email4">
Email*</p>
<p>
<textarea name="message" id="textarea3"></textarea>
Questions</p>
<p>
<input type="submit" name="Submit" value="Submit">
</p>
<p>
<input type="reset" name="Submit2" value="Reset">
</p>
</form>
Can this have anything to do with the fact that I have another form on my site of which the redirect = thanks.html (This is the re-direct page of the script that has the problem)?
Any help on this issue is greatly appreciated
|