jay_bo Posted April 30, 2010 Share Posted April 30, 2010 Hey, i am having trouble with a email script... I can't remember how to include variables in an email message, please could someone rejog my memory, heres my code <?php $date = $_POST["G-Preferred_Start_date"]; $nights = $_POST["nights"]; $adults = $_POST["adults"]; $children = $_POST["children"]; $name = $_POST["name"]; $email = $_POST["email"]; $telephone = $_POST["telephone"]; $to = "myeamil@email.com"; $subject = "TAccomodation Enquiry"; $message = "Hello! This is an email from the delton website \n".$date.""; $from = "someonelse@example.com"; $headers = "From: $from"; mail($to,$subject,$message,$headers); echo "Mail Sent."; ?> Quote Link to comment https://forums.phpfreaks.com/topic/200321-php-email-code/ 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.