- This topic is empty.
-
AuthorPosts
-
September 26, 2009 at 1:54 pm #26250
tomwalters5678
MemberOkay, so I’m building this user management system for a client and up until a few day ago it was working perfectly. I mush have edited some code or done something because now it just ain’t working! Have been looking through the code for ages now and I just can’t find any errors. Can you?
There are 3 files: login.php, userauth.php and index.php. Login.php is where the user enters their details to login, these details are then passed to userauth.php and if correct the browser is then redirected to index.php. The problem is this. When I get to the index page the session variables are cleared. I have checked at each stage and the data is present up until the index page. Now if you were wondering there is a base.php, this is just connecting to the database – and no there aren’t any errors or odd code in there, but I’m not too keen on sharing my login details with you as you can imagine!
login.php:
Code:
St Ann’s Church | Login
Please enter a valid Username and Password!tt“; } ?>
userauth.php:
Code:“; }
?>
St Ann’s Church | Login
“; };
if($row[‘firstLogin’] == 0){ mysql_query(“UPDATE users SET firstLogin='”.$date.”‘ WHERE username='”.$iusername.”‘”); };
mysql_query(“UPDATE users SET lastLogin='”.$date.”‘ WHERE username='”.$iusername.”‘”);
mysql_query(“UPDATE users SET online=’1’ WHERE username='”.$iusername.”‘”);
echo ““;
}
else {
echo ““;
session_destroy();
}?>
index.php:
Code:“; die();*/ echo “N
DR”; };
?>
St Ann’s Church | CMS
I have been pulling my hair out over this and if you can tell me why it isn’t playing ball I would be really grateful.
Thanks guys.
-Tom
September 27, 2009 at 12:53 am #64737cybershot
Participanttry asking this question over at phpfreaks.com
-
AuthorPosts
- The forum ‘Back End’ is closed to new topics and replies.