Quote:
Originally Posted by CSGCarl
Ok I get this error 'Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/*****/public_html/homepage.php on line 928'
Code:
This is the code I put in the website:
If ($vbulletin->userinfo['userid']!=0)
{
echo "<img src="http://www.mysite.com/images/bse_top.png" width="248" height="32">";
} else {
echo "Your not logged in so we display this";
}
?>
Can some one tell me what I'm doing wrong please?
|
You need to escape the " in your HTML.
Just put \ in front of the " that are part of the HTML and not your PHP.
Like this
PHP Code:
If ($vbulletin->userinfo['userid']!=0)
{
echo "<img src=\"http://www.mysite.com/images/bse_top.png\" width=\"248\" height=\"32\">";
} else {
echo "Your not logged in so we display this";
}
?>