Ok, im new to programming so i thought id start trying to learn php. What ive tried to do is create a mailer.php page that takes info from a form and then emails it to my email address. All well and good, it works, its fantastic, but i have one huge and annoying problem, i cant get the From address to appear when i recieve the email. It just says “Nobody”. The subject shows perfectly but not the From address. Take a look at the code:
<?php $email = $_REQUEST['email'] ; $message = $_REQUEST['message'] ; $date = date ("l, F jS, Y"); $time = date ("h:i A"); if (!isset($_REQUEST['email'])) { header( "Location: contact.html" ); } elseif (empty($name) || empty($email) || empty($repeat) || empty($comments)) { header( "Location: error.html" ); } else { mail( "[email protected]", "Feedback Form Results", "$messagenName: $namenEmail Address: $emailnRepeat Email: $repeatnEmail Type: $typenFeedback: $commentsnDate: $datenTime: $time" ); header( "Location: confirm.html" ); } ?>I need the information $email as the From address so i can then simply reply to the person sending the email. I have tried putting the information just after the mail and just before the sendto email address… and various other place, but it just wont work!!! Some help please before i pull all my hair out before im 23!!!
Cheer!!!