• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

How could I stop PHP from displaying the error?

WarDemon666

Platinum Member
This is the script, it searches for the cookie, if its not there, then it says warning, loggedin is not defined. Is there a way that if the cookie is not there, that it will just show the html and nothing else?

Thanks,
Wardemon

<?
if($loggedin) {
header("location: logged.php");
}
?>
<html>
<body>
This is the main html page
</body>
</html>
 
You can use the '@' symbol before an expression to suppress error messages caused by that expression.

In this case you can use if(@$loggedin) ...
 
Thanks!!

one more question, if i put an echo with a link, i get a parse error, what am i doing wrong? heres what it looks like:

echo "Thanks for logging in.";
echo "You can login to a web ftp client. Here is the URL: <a href="http://www.link.com">link</a>";
echo "Soon there will be access to your account with our own FPT client. Stay tuned.";

i get this error: Parse error: parse error, expecting `','' or `';''

Any ideas?

Thanks

 
Wrong:
echo "You can login to a web ftp client. Here is the URL: <a href="http://www.link.com">link</a>";

Right:

echo "You can login to a web ftp client. Here is the URL: <a href=\"http://www.link.com\">link</a>";

or

echo "You can login to a web ftp client. Here is the URL: <a href='http://www.link.com'>link</a>";
 
Back
Top