Re: Help with an error...

From: Date: Thu, 24 Jul 2008 17:46:12 +0000
Subject: Re: Help with an error...
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-277252@lists.php.net to get a copy of this message
On Jul 24, 2008, at 1052AM, payne@magi.magidesign.com wrote:
$result = mysql_query($query)
Missing a ; at the end of the line.
       $mailsend = mail("terrorpup@gmail.com","The IP's that Attacked
$hostname", "The following are ip's that have try to attack your system.\r\n\r\
You can't execute code inside of a function call the way you're trying to do. Instead do something like: $message = "The following are ip's that have try to attack your system.\r\n\r\"; Then in your code below, anywhere you have an echo statement, replace it with $message .= "code here". For example: $message "<tr><td align=\'left\'>$row[0]</td><td><div align=\'right\'>$row[1]</div></td></tr>"; Then after you're done building your $message for the email, mail("terrorpup@gmail.com","The IP's that Attacked $hostname", $message); I'd suggest taking another read of the manual page for the mail function: http://php.net/manual/en/function.mail.php - the email is sent when you make the call, not created and stored in a variable when executed. Brady

« previous php.general (#277252) next »