Mr_J Posted November 5, 2009 Share Posted November 5, 2009 Hi all, Another mail form... When I receive the mail, the "From" head= NOBODY. How can I change this(nobody) to the web address? HTML: Contact us The form: <form method="post" enctype="multipart/form-data" action="work.php" onSubmit="return validatePage1();"> This code is the button SUBMIT, RESET... <input id="saveForm" class="mainForm" type="submit" value="Submit" /> <input type="reset" value="Reset"> Then, WORK.PHP: <?PHP $where_form_is="Changed to whatever NO DIFFERENCE".$_SERVER['Changed to whatever NO DIFFERENCE'].strrev(strstr(strrev($_SERVER['Changed to whatever NO DIFFERENCE']),"/")); mail("mymail@somewhere.com","The Subject","First line in mail msg: Name: " . $_POST['field_1'] . " Surname: " . $_POST['field_2'] . " Email: " . $_POST['field_3'] . " Tel: " . $_POST['field_4'] . " Message: " . $_POST['field_5'] . " a creation by MrJ. "); include("confirm.html"); ?> in the "confirm.html, I just say thank you etc. as well as the validation of the e-mail address and other required fields... Quote Link to comment Share on other sites More sharing options...
trq Posted November 5, 2009 Share Posted November 5, 2009 See example #2 mail. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.