Jump to content

E-mail It Says It's From 'nobody'


SuperPaperSam

Recommended Posts

I have a PHP form and it works fine but it says that it's from 'nobody' How can I fix this??? I want it to say it was sent from $emailFieldPHP Code

<?php	$emailsubject = 'Contact';	$webMaster = 'sorry w3schools i dont want everyone knowing my email';	$nameField = $_POST ['name'];	$emailField = $_POST ['email'];	$messageField = $_POST ['message'];	$body = <<<EOD<br><hr><br>Name: $nameField <br>Email: $emailField <br><hr><br>Message: $messageField <br><br><hr><br>EOD;	$headers = "From: $email\r\n";	$headers .= "Content-type: text/html\r\n";	$success = mail($webMaster, $emailsubject, $body, $headers);	$theResults = <<<EOD<html><head><title>Email has been success fully sent!</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><style type="text/css"><!--body {	background-color: #f1f1f1;	font-family: Verdana, Arial, Helvetica, sans-serif;	font-size: 12px;	font-style: normal;	line-height: normal;	font-weight: normal;	color: #666666;	text-decoration: none;}--></style></head><div>  <div align="left">Thank you for contacting me I will get back to you soon!</div></div></body></html>EOD;echo "$theResults"?>

Any help would be appreciatedThanks!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...