kevinkhan
03-22-2010, 01:28 PM
<?php if(isset($_POST['submit']))
{
echo "hello";
$firstName = $_POST['firstName'];
$lastName = $_POST['lastName'];
$email = $_POST['email'];
$mobile = $_POST['mobile'];
$comments = $_POST['comments'];
$to = "info@projectorhire.ie";
$subject = "Projector Hire Inquiry!";
$body =
"\nName: " . $firstName . " " . $lastName .
"\nEmail: " . $email .
"\nPhone Number: " . $mobile .
"\nMessage: " . $comments;
$headers = "From: ". $firstName ." ". $lastName . " <" . $email . ">\r\n";
if (mail($to, $subject, $body, $headers)) {
echo("<p class=\"errors\">Thanks for submitting your enquiry.</p>");
}
else {
echo("<p class=\"errors\">Message delivery failed. Please fill in or Quick Contact Form again or call us on 087-9850714 to get immediate assistance.</p>");
}
}
?>
</span>
<form id="form" method="post" action="index.php#anchor" >
<p>
<label>First Name</label>
<input type="text" id="firstName" name="firstName" value="" />
</p>
<p>
<label>Last Name</label>
<input type="text" id="lastName" name="lastName" value="" />
</p>
<p>
<label>Email:</label>
<input type="text" id="email" name="email" value="" />
</p>
<p>
<label>Phone:</label>
<input type="text" id="mobile" name="mobile" value="" />
</p>
<p>
<label>Comments:</label>
<textarea name="comments" id="comment" cols="30" rows="3" ></textarea>
</p>
<p> <input class="submit" type="image" src="images/submit.gif" name="submit" value="submit" /></p>
</form>
it works in firefox but not in Ie for some weird reason...
Check www.projectorhire.ie for live version
Let me know if you know what the problem is
Thanks
{
echo "hello";
$firstName = $_POST['firstName'];
$lastName = $_POST['lastName'];
$email = $_POST['email'];
$mobile = $_POST['mobile'];
$comments = $_POST['comments'];
$to = "info@projectorhire.ie";
$subject = "Projector Hire Inquiry!";
$body =
"\nName: " . $firstName . " " . $lastName .
"\nEmail: " . $email .
"\nPhone Number: " . $mobile .
"\nMessage: " . $comments;
$headers = "From: ". $firstName ." ". $lastName . " <" . $email . ">\r\n";
if (mail($to, $subject, $body, $headers)) {
echo("<p class=\"errors\">Thanks for submitting your enquiry.</p>");
}
else {
echo("<p class=\"errors\">Message delivery failed. Please fill in or Quick Contact Form again or call us on 087-9850714 to get immediate assistance.</p>");
}
}
?>
</span>
<form id="form" method="post" action="index.php#anchor" >
<p>
<label>First Name</label>
<input type="text" id="firstName" name="firstName" value="" />
</p>
<p>
<label>Last Name</label>
<input type="text" id="lastName" name="lastName" value="" />
</p>
<p>
<label>Email:</label>
<input type="text" id="email" name="email" value="" />
</p>
<p>
<label>Phone:</label>
<input type="text" id="mobile" name="mobile" value="" />
</p>
<p>
<label>Comments:</label>
<textarea name="comments" id="comment" cols="30" rows="3" ></textarea>
</p>
<p> <input class="submit" type="image" src="images/submit.gif" name="submit" value="submit" /></p>
</form>
it works in firefox but not in Ie for some weird reason...
Check www.projectorhire.ie for live version
Let me know if you know what the problem is
Thanks