Well, after much work, at last, i have created members system. Well its not completed yet, reason is when i open page it works - it can register new peoples, can login but (till my website doesn't have any memberr-only page.) I don't know how to make "Sign Up" button disappear while user has logged-in and show "Log out" and "User Name" instead. Means, IDK how to tell website that user has logged in. I know it is not big deal, i just don't get how... please help me. Hear my codes...
- This part is at end of my login script....
I think problem is here....
$_SESSION['userName'] = $userName;
echo 'Successfuly logged-in!';
- This is part of index.php , in that empty division with id "systemTarget", i want to show buttons... like "Sign Up" and "Sign In" if user is not signed in, and "Username" & "Log out" if user isn't signed in.
<div id="wrap_h"><img src="images/jsk_logo_pfc.jpg" style="float:left"/><div id="systemTarget"></div>
Hope i am clear, In addition: It would be great if somebody also tells me that how to make some pages "members-only" (if i not get from the answer of above)...!