[php]Help with login

Joined
Dec 31, 2004
Messages
4,086
Reaction score
25
I\'ve got the login fully working, cept on pages where I want both PUBLIC and REGISTERED to view, the login box shows!

I\'ve uploaded a couple of my pages to show u what i mean :P
http://josh.bur.st/script.rar
--
Login.php: login script
config2.php: config page
contact.php: not needed to sign in, has login box
designs.php: needed to sign in, user box.
--

Now, I want to do this:
If a user has signed in, it shows the user box. If the user hasnt, it shows the login box.
Here is some screenshots:
http://josh.bur.st/1.PNG
http://josh.bur.st/2.PNG

Its fully working on my localserver apache/mysql/php setup, but on my site i need to reconfigure it:
Josh.bur.st
 
session_start();
if ($_SESSION['logged_in'] == 1)
{page contents} else {not logged in}

that will check if they are logged in, on the login script make it so that $_SESSION['logged_in'] = 1 if the username/pass is correct. That should solve all your problems but remember to use session_start() on all the member pages otherwise it wont think your logged in...ever
 
Last edited:
Back