hi, i have a membership script on my site that works perfectly but i cant restrict access to the members page. when i type it in (www.tab-db.com/content/member.php) it comes up...some way i can create a way to check for a session and if no session is found it redirects me to the login page?
i really stuck on this

thanks

    Hi there,

    To restrict access you can run a snippet at the beginning of the page to check if the user has been logged in. Something like:

    session_start();
    if ( $_SESSION['user_loggedin'] != 1){
    header ("location: notloggedin.php");
    exit();
    }

    and then when someone does login check their details and set $_SESSION['user_loggedin'] to 1

    web design by adshires.co.uk

      Write a Reply...