unstopabl3 Posted March 4, 2006 Share Posted March 4, 2006 I would like to manupilate the following lines of code according to my need. I have tried everything and tried many many times but invein i gave up and asking for someones help[code]$name = ($_POST['name']);$email = ($_POST['email']);$subject = ($_POST['subject']);$msg = ($_POST['msg']);$to = "email@example.com";$d = date("D M d, Y h:i:s");$ip = getenv("REMOTE_ADDR");$sub = "vXdesigns Contact Form";$headers .= "From: $name <$to>\n"; $headers .= "X-Sender: $email\n"; $headers .= "X-Mailer: php\n"; $headers .= "X-Priority: 3\n"; $headers .= "Return-Path: $email\n"; $headers .= "Reply-To: $email\n";[/code]now i already know the basics but can someone please explain to me in detail what these header values are and what are they supposed to do. Are there any more values i can use to do different things ???thanks in advance[b]Edit by neylitalo:[/b] Removed email address for user privacy. Quote Link to comment https://forums.phpfreaks.com/topic/4061-simple-contact-form/ Share on other sites More sharing options...
gamefreak13 Posted March 4, 2006 Share Posted March 4, 2006 Cleaned up..[code]$name = $_POST['name'];$email = $_POST['email'];$subject = $_POST['subject'];$msg = $_POST['msg'];$to = "you@email.com";$d = date("D M d, Y h:i:s");$ip = $_SERVER['REMOTE_ADDR'];$sub = "Contact Form";$headers .= "From: $name <$to>\n"; $headers .= "X-Sender: $email\n"; $headers .= "X-Mailer: php\n"; $headers .= "X-Priority: 3\n"; $headers .= "Return-Path: $email\n"; $headers .= "Reply-To: $email\n";[/code]The first 4 are the names of the input form fields. The next is your e-mail address. Next is the current date. Then the IP address of the submitter. Then the e-mail subject line. Then who is the e-mail from. What sent you the email. The priority of the email. If you reply, it is sent to this address. If you reply, it is sent to this address.Hope that all made sense. Its all in order, with each line seperated by a period.Example of the first 4 lines:<input type="text" name="name">so $_POST['name']; is whatever the person enters into that field.Same with<input type="text" name="email">$_POST['email']; Quote Link to comment https://forums.phpfreaks.com/topic/4061-simple-contact-form/#findComment-14078 Share on other sites More sharing options...
unstopabl3 Posted March 4, 2006 Author Share Posted March 4, 2006 [!--quoteo(post=351509:date=Mar 3 2006, 10:35 PM:name=Gamefreak13)--][div class=\'quotetop\']QUOTE(Gamefreak13 @ Mar 3 2006, 10:35 PM) [snapback]351509[/snapback][/div][div class=\'quotemain\'][!--quotec--]Cleaned up..[code]$name = $_POST['name'];$email = $_POST['email'];$subject = $_POST['subject'];$msg = $_POST['msg'];$to = "you@email.com";$d = date("D M d, Y h:i:s");$ip = $_SERVER['REMOTE_ADDR'];$sub = "Contact Form";$headers .= "From: $name <$to>\n"; $headers .= "X-Sender: $email\n"; $headers .= "X-Mailer: php\n"; $headers .= "X-Priority: 3\n"; $headers .= "Return-Path: $email\n"; $headers .= "Reply-To: $email\n";[/code]The first 4 are the names of the input form fields. The next is your e-mail address. Next is the current date. Then the IP address of the submitter. Then the e-mail subject line. Then who is the e-mail from. What sent you the email. The priority of the email. If you reply, it is sent to this address. If you reply, it is sent to this address.Hope that all made sense. Its all in order, with each line seperated by a period.Example of the first 4 lines:<input type="text" name="name">so $_POST['name']; is whatever the person enters into that field.Same with<input type="text" name="email">$_POST['email'];[/quote]Thx i appreciate your help ):) Quote Link to comment https://forums.phpfreaks.com/topic/4061-simple-contact-form/#findComment-14158 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.