Jump to content

PHP Email code


jay_bo

Recommended Posts

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 = "[email protected]";
$subject = "TAccomodation Enquiry";
$message = "Hello! This is an email from the delton website \n".$date."";
$from = "[email protected]";
$headers = "From: $from";
mail($to,$subject,$message,$headers);
echo "Mail Sent.";
?> 

Link to comment
https://forums.phpfreaks.com/topic/200321-php-email-code/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.