help with send mail form
Posted: Mon Sep 14, 2009 10:38 pm
Hi,
I modified some old code of mine and cant get a form to work.. can someone look at it and see what I'm missing?
Here's my send code:
Here's my form (just a snippet):
Im getting a mail returned false error...
Any help is greatly appreciated.. THANKS!
I modified some old code of mine and cant get a form to work.. can someone look at it and see what I'm missing?
Here's my send code:
Code: Select all
<?php
$to = "REMOVED@gmail.com";
$subject = "Proposal Request";
$name=$_POST['name'];
$email=$_POST['email'];
$phone=$_POST['phone'];
$website=$_POST['website'];
$time=$_POST['time'];
$more=$_POST['more'];
$company=$_POST['company'];
$headers = "From: $email";
$sent = mail($to, $subject, $message, $headers) ;
$message = "
Name:$name\n
Phone: $phone\n
Best Time to Call: $time\n
Website: $website\n
Company: $company\n
Project Details: $more\n";
if($sent)
{
echo '<META HTTP-EQUIV="REFRESH" CONTENT="1;URL=http://www.REMOVED.html">'; }
else
{
echo "Mail returned false: ".$sent; }
?>Code: Select all
<form action="http://removed.php" method="post">
<label class="description">Name </label>
<input name="name" id="name" class="element text" maxlength="255" value="" size="36" type="text"/>
<label class="description">Email </label>
<input name="email" id="email" class="element text medium" type="text" maxlength="255" value=""/>
Any help is greatly appreciated.. THANKS!