Jump to content

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

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!

Edited by SuperPaperSam
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...