View Full Version : Please help with $_SESSION

04-21-2012, 11:55 AM
Hey guys, could you help me please with $_SESSION as I'm trying to create admin login page. Here's the code:

(Then I enter adminindex.php which checks if "username" is admin or not from MySQL table).

What I want to do is to make it as a form, so I wouldn't need to go to the actual code to change the "username" and that it would transfer me to adminindex.php (where it checks if "username" is an admin or not).

Thank s in advance!

04-21-2012, 01:32 PM
Are you saying you want to alter the current session? I hope not.

If you mean someone enters their username and password and it creates a session, and it creates a new session for their username, that's different.

04-21-2012, 04:39 PM
I'm not sure what is the difference as I'm new at it... I'm just looking into different ways to login to admin panel. I was hoping that it is possible to change the "username" in other way then thru code editing.