[web] PHP Mailer

Started by
1 comment, last by -Gray Fox- 16 years, 4 months ago
I do not know why this does not work. It sends the message, and the $today works, and sends, but all the other variables are blank.

<?php

$sender = "TMD-Music.com";

$name = $_POST['name'];
$day = $_POST['dd'];
$month = $_POST['mm'];
$year = $_POST['yy'];

$today = date("l, F j, Y, g:i a") ;

$body ="This message was auto generated by TMD-Music.com on: $today \n
Name: $name \n
Date Of Event: $date / $month / $year";

?>

Sending Request...

<?php
mail("natekrygier@gmail.com","TMD Music Inquiry",$body,$sender);
?>

Advertisement
It's impossible to know without seeing the HTML form. My best guess is that your form is using GET instead of POST.

<hr />
Sander Marechal<small>[Lone Wolves][Hearts for GNOME][E-mail][Forum FAQ]</small>

In this way it should works...

$body ="This message was auto generated by TMD-Music\.com on:".$today."\n Name:".$name."\n Date Of Event: ".$date."/".$month."/".$year;


[Edited by - -Gray Fox- on December 20, 2007 11:18:43 AM]

This topic is closed to new replies.

Advertisement