dthomas31uk
Technical User
Hi Guys. Have a form
Dont worry to much about look of it yet...just want to get it to submit correctly.
When I submit the form I recieve an email, but I only recieve the actual information from the message box.
I receive no name from the 'name' textbox.
From shows the actual server that my site is on '$to@customersites3.easily.co.uk
To shows the email address which its sent to ...which is correct.
What am I doing wrong?
Here is my phpfile
<?
$name = $_POST["name"];
$telephone = $_POST["telephone"];
$email = $_POST["email"];
$message = $_POST["message"];
$to = "myemail@adrress.co.uk"; // To email address
$subject = "Form submitted";
$headers = 'From: $to'. "\r\n" .
'Reply-To: $to' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
if(mail($to, $subject, $message, $headers))
{
header("Location: questions4.php");
exit;
}
else
{
echo "error in mail";
}
Hope someone can help. Cheers guys
Dont worry to much about look of it yet...just want to get it to submit correctly.
When I submit the form I recieve an email, but I only recieve the actual information from the message box.
I receive no name from the 'name' textbox.
From shows the actual server that my site is on '$to@customersites3.easily.co.uk
To shows the email address which its sent to ...which is correct.
What am I doing wrong?
Here is my phpfile
<?
$name = $_POST["name"];
$telephone = $_POST["telephone"];
$email = $_POST["email"];
$message = $_POST["message"];
$to = "myemail@adrress.co.uk"; // To email address
$subject = "Form submitted";
$headers = 'From: $to'. "\r\n" .
'Reply-To: $to' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
if(mail($to, $subject, $message, $headers))
{
header("Location: questions4.php");
exit;
}
else
{
echo "error in mail";
}
Hope someone can help. Cheers guys