Jump to content

[SOLVED] Script not working - HELP!


xQuasar

Recommended Posts

Can anyone tell me why this script I made isn't working? It's supposed to check whether or not someone is logged in, and show a different set of menu buttons for both situations, but all that's happening is that it's showing the set for when it's logged in no matter what. ><

 

<html>
<head>
</head>
<body bgcolor="black">
<?php
if($_SESSION['logged_in']=true)
{
?>
<font size="5" color="white" face="Lucida Handwriting,Arial">
</font>
<br />
<form>
<table width="100%" border="0" cellspacing="3" cellpadding="0">
<tr>
<td width="100%"><font face="Verdana" color="white" size="4"><body vlink="white" alink="white" link="white" />
<center><a href="index.php">Home</a></center><br /></font></td>
</tr>
<td width="100%"><font face="Verdana" color="white" size="4"><body vlink="white" alink="white" link="white" />
<center><a href="coming.php">Forums</a><br /></center><br /></font></td>
</tr>
<tr>
<td width="100%"><font face="Verdana" color="white" size="4"><body vlink="white" alink="white" link="white" />
<center><a href="base.php">Base</a><br /></center><br /></font></td>
</tr>
<tr>
<td width="100%"><font face="Verdana" color="white" size="4"><body vlink="white" alink="white" link="white" />
<center><a href="coming.php">Etc.</a><br /></center><br /></font></td>
</tr>
<tr>
<td width="100%"><font face="Verdana" color="white" size="4"><body vlink="white" alink="white" link="white" />
<center><a href="logout.php">Logout</a><br /></center><br /></font></td>
</tr>
<tr>
</table>
</form>
<?php
} elseif($_SESSION['logged_in']=false) {
?>
<br />
<form>
<table width="100%" border="0" cellspacing="3" cellpadding="0">
<tr>
<td width="100%"><font face="Verdana" color="white" size="4"><body vlink="white" alink="white" link="white" />
<center><a href="index.php">Home</a></center><br /></font></td>
</tr>
<tr>
<td width="100%"><font face="Verdana" color="white" size="4"><body vlink="white" alink="white" link="white" />
<center><a href="login.php">Login</a><br /></center><br /></font></td>
</tr>
<tr>
<td width="100%"><font face="Verdana" color="white" size="4"><body vlink="white" alink="white" link="white" />
<center><a href="coming.php">Forums</a><br /></center><br /></font></td>
</tr>
<tr>
<td width="100%"><font face="Verdana" color="white" size="4"><body vlink="white" alink="white" link="white" />
<center><a href="register.php">Register</a><br /></center><br /></font></td>
</tr>
</table>
</form>
<?php
}
?>
</body>
</html>

 

Thanks heaps!

Link to comment
https://forums.phpfreaks.com/topic/134963-solved-script-not-working-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.