View Full Version : line error on mail send form why..it used to work?

06-29-2005, 06:22 PM
Hi can you please tell me why this form does not send anymore. i'm getting this error......

here the error:
Notice: Undefined variable: message in /home/test.co.za/ftp/html/sent.php on line 11

heres the php:

//echo "Title[$Title]";
$txtTo = "test@test.com";
$txtFrom = "From: $email \r\n";
$subject = " test ";
$header = " \n\n";
$footer = " \n";

// continue with rest of form...
$message .= "Name : $name \n\n";
$message .= "E-mail : $email \n\n";
$message .= "Phone : $phone \n\n";
$message .= "Property wanted : $type_of \n\n";
$message .= "Questions : $question \n\n";

mail ($txtTo, $subject, $header . $message . $footer, $txtFrom);




06-29-2005, 06:45 PM
You're using the concatention operator (.=) to add to a variable (message) that has not been assigned any value or anything.
You can't do that.

Put this somewhere before it.
$message= "";

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum