Re: Help with an error...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Jul 24, 2008, at 1052AM, payne@xxxxxxxxxxxxxxxxxxx wrote:

$result = mysql_query($query)

Missing a ; at the end of the line.


       $mailsend = mail("terrorpup@xxxxxxxxx","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@xxxxxxxxx","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

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux