Thanks for the help.
unfortunately it did nothing for me.
I get a parse error about10 rows before this function.
But i know it is this function that does it.
If i remove this function the error goes away...
And i get a MySQL error message from about 100 rows after this.
Saying that $owner is empty.
"SELECT * FROM sida where owner = order by id"
Does the function "swallow" the var?
I figure that since it defined outside functions, it will always be avaliable outside functions...
#insert the head of the message, the array message, and the owners id
function Message($head, $message, $owner) {
#conver the array message to a readeble text
foreach ($message as $the_message) {
$new_message="$the_message\n$new_message";
}
#get the email of the recipient $owner
$query="select email from org where owner = $owner";
#using the fancy function Query() that i made.
$result=Query($query);
$row=mysql_fetch_array($result)
$recipient=$row["email"];
#send the mail
mail("$recipient", "$head","$new_message","From: [email]noreply@company.do[/email]");
}
IF ($message > NULL) Message($head, $message, $owner);