I've managed to create a form that submits it's data to a MySQL database and also sends an email to a set list. Within the email I want to print the date in a D, d, Y format... the form is providing the date as a TIMESTAMP which I need for the database, so I can't just reformat that.
My email code goes as such:
Code: Select all
//Begin Email
if ((isset($_POSTї"MM_insert"])) && ($_POSTї"MM_insert"] == "add_event"))
{
$msg = "Event added for Date:\t$date\n" ;
$msg .= "Appointment:\t$text\n";
$recipient = "xxx@xxx.co.uk";
$subject = "Week Ahead Update";
$mailheaders = "From: xxx <> \n";
$mailheaders .= "Reply-To: $xxx@xxx.co.uk\n\n";
mail($recipient, $subject, $msg, $mailheaders);
}
//End EmailHope I've make this clear.. Any pointers would be great