still newbie: syntax error:
Posted: Fri Jul 29, 2005 8:21 am
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?
-------------------------------------
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?