This is my send.php
and this is my contact form.Code:<?php $to = email@email.com"; //Your email goes here $name = stripslashes($_POST["name"]); $email = stripslashes($_POST["email"]); $subject = stripslashes($_POST["name"]); $message = stripslashes($_POST["message"]); $headers = "MIME-Version: 1.0" . "\r\n"; $headers .= "Content-type: text/plain; charset=utf-8" . "\r\n"; $headers .= "From: $name <$email>" . "\r\n"; if(mail($to, $subject, $message, $headers)){ echo "Your message was sent! Thank you."; //This message gets display to user on success }else{ echo "Sorry, your message wasn't sent. Try again or contact me at $to"; //Message displayed to user on failure } ?>
This contact form is working fine, it sends to my email address, but I need to include the phone number in the body of the email. I know i added the phone number field alreaday. But I need help getting it on send.phpCode:<h1 class="header">Contact form</h1> <form id="contact-form" action=""> <div> <label for="form_name">Name</label> <input id="form_name" name="name" type="text" /><br /> </div> <div> <label for="form_email">Email</label> <input class="vemail" id="form_email" name="email" type="text" /><br /> </div> <div> <label for="phone">Phone #</label> <input class="phone" id="phone" name="phone" type="text" /><br /> </div> <div> <label for="form_message"></label>Comment<br /><br /> <textarea id="form_message" name="message" rows="5" cols="10"></textarea><br /> </div> <div> <input id="send_contact" type="image" src="images/submit.png" /> </div> </form>
Can someone help please.



Reply With Quote


Bookmarks