When I run this code:
<html>
<head>
</head>
<body>
<ul>
<li>
<?php
if(isset($_COOKIE["username"])){
print "Hello, ";
}
elseif(isset($_SESSION["userId"])){
print "Hello, ";
}
else{
print "<p><a href='logInForm.php'>Log In</a></p>";
}
?>
</li>
</ul>
</body>
</html>
This is the output:
-Log In
";}?>
I don't have any idea why it is printing out of the parenthesis. Any help?
tag
– tyC2014 Jul 29 '15 at 15:32` tags. it doesn't know what html is. php only cares about `` (and maybe `` if you have short-tags enabled).
– Marc B Jul 29 '15 at 16:24tag.
– tyC2014 Jul 29 '15 at 16:39