Hi, I would like to make one of my pages in my site only visible after the user has logged on, as at the minute you could just go to the URL and the page would be displayed, how can I stop this and only make it visible after logon?
Simple Register-Login-Logoff System
Use this tutorial to create a registration / login forms.. then user can log in to view the content.
You just have to simple, set a Session variable.
like this:
when u login set this variable:
'Code:$_SESSION['login'] = "yes";
then test on the others sites like this:
remember to set the session_start();Code:if($_SESSION['login'] == yes) { include "Yoursite.php"; }else { echo "You arent logged in!!"; }
before using session variables
Good luck, Flezria
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks