Ok, I have a login script, simple login script, the login page and the main page(after you login) is in the same file. . . like so:
main.php
PHP Code:
<?
include("include/session.php"); // includes important MySQL Info
?>
<html>
<title>4D Realms</title>
<body background="bg2.png">
<table>
<tr><td>
<?
if($session->logged_in){ // if the session is started, do the following:
echo "<h1>Logged In</h1>";
echo "Welcome <b>$session->username</b>, you are logged in. <br><br>" // General Info
."[<a href=\"userinfo.php?user=$session->username\">My Account</a>] " // View The Info on your Account
."[<a href=\"useredit.php\">Edit Account</a>] "; /// Edit your own Account
if($session->isAdmin()){
echo "[<a href=\"admin/admin.php\">Admin Center</a>] "; /// ADMIN ONLY: Admin Center
}
echo "[<a href=\"../index.php\">Forum</a>] "; // To the Forum
echo "[<a href=\"process.php\">Logout</a>]"; /// Loging Out
echo "<br><br>";
echo "Unique Visitors: ";
include ("huc.php"); /// Unique Counter File
echo "<br>";
include ("counter.php"); // Site Hits Counter File
echo "<br><br><br><A href=\"Admin.php\">Click here for a table of the users!</a>"; // Table Of Users
}
else{
?>
<h1>Login</h1>
<?
/**
* User not logged in, display the login form.
* If user has already tried to login, but errors were
* found, display the total number of errors.
* If errors occurred, they will be displayed.
*/
if($form->num_errors > 0){
echo "<font size=\"2\" color=\"#ff0000\">".$form->num_errors." error(s) found</font>";
}
?>
<form action="process.php" method="POST">
<table align="left" border="0" cellspacing="0" cellpadding="3">
<tr><td>Username:</td><td><input type="text" name="user" maxlength="30" value="<? echo $form->value("user"); ?>"></td><td><? echo $form->error("user"); ?></td></tr>
<tr><td>Password:</td><td><input type="password" name="pass" maxlength="30" value="<? echo $form->value("pass"); ?>"></td><td><? echo $form->error("pass"); ?></td></tr>
<tr><td colspan="2" align="left"><input type="checkbox" name="remember" <? if($form->value("remember") != ""){ echo "checked"; } ?>>
<font size="2">Remember me next time </font>
<input type="hidden" name="sublogin" value="1">
<input type="submit" value="Login"></td></tr>
<tr><td colspan="2" align="left"><br><font size="2">[<a href="forgotpass.php">Forgot Password?</a>]</font></td><td align="right"></td></tr>
<tr><td colspan="2" align="left"><br>Not registered? <a href="register.php">Sign-Up!</a></td></tr>
</table>
</form>
<?
}
/**
* Just a little page footer, tells how many registered members
* there are, how many users currently logged in and viewing site,
* and how many guests viewing site. Active users are displayed,
* with link to their user information.
*/
echo "</td></tr><tr><td align=\"center\"><br><br>";
echo "<b>Member Total:</b> ".$database->getNumMembers()."<br>";
echo "There are $database->num_active_users registered members and ";
echo "$database->num_active_guests guests viewing the site.<br><br>";
include("include/view_active.php");
?>
</td></tr>
</table>
</body>
</html>
Ok so now when I log in with FF(firefox) it redirects me perfectly to what it should but when I do it with IE it doesn't, It says I log on down at the bottom (where it shows the users online) and then it keeps me at the login part of the script, If i try to go to Admin.php which has an statement at the top it shows a message
Quote:
|
Not Logged In, Click Here
|
Can anyone figure out why that is, And it's not only on my computer I got a friend to try it too (actually he pointed it out to me  ) Hope someone can help
|