php code:
-------------------------------------
function Alert($str)
{
echo("<script language='javascript'>");
echo("alert('$str');");
echo("</script>");
}
$str="Error: ".mysql_error();
Alert($str);//last line
-------------------------------------
problem is last line:
test (all OK)
1) if $str="PPPPP";
2) or: if last line changes to echo($str);
error is: Expected ')'
what is the matter?
still newbie: syntax error:
Moderator: General Moderators
-
php12342005
- Forum Commoner
- Posts: 79
- Joined: Mon Mar 21, 2005 3:35 am
still newbie: syntax error:
Last edited by php12342005 on Fri Jul 29, 2005 8:35 am, edited 1 time in total.
Look at posting rules before the mods yell at you
it does say Aleat instead of Alert...
Change that and tell us what happens
it does say Aleat instead of Alert...
Change that and tell us what happens
-
php12342005
- Forum Commoner
- Posts: 79
- Joined: Mon Mar 21, 2005 3:35 am