SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Zealot
    Join Date
    Jul 2003
    Location
    London
    Posts
    189
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    session acting funny

    just tried to do something that i havemt had to till now and it doesn not work for some reason

    i use session for the login security on my content management. the way it works at the mo is it checks if you are logged in al any page bar login

    but i wanted to add a support page that didnt require login access but just adding OR to the if statement didnt work

    any idea why? seems like the rigth way to do it to me?!?!


    PHP Code:
    session_start();
        if (
    $_GET['page'] != 'login')  
        {
            if (@
    $_SESSION['login_status'] != 'in')
            {
                
    header("Location: http://localhost/GIG/index.php?page=login&stage=1");
                exit();
            }
        } 

  2. #2
    SitePoint Enthusiast
    Join Date
    Sep 2002
    Location
    Hamburg
    Posts
    73
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If your login-check is at the beginning of the page, you could just include a support page.

    PHP Code:
    include ("your_directory/support_page.php"); 

  3. #3
    SitePoint Zealot
    Join Date
    Jul 2003
    Location
    London
    Posts
    189
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    what u mean an IF page is support page display support and EXIT?

    hmm good point

    is this the best way to do it?

    JP

  4. #4
    SitePoint Zealot
    Join Date
    Jul 2003
    Location
    London
    Posts
    189
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    oh that doesnt work

    my template is the one that calls the session

    i need the OR statement to work

    anyone?

    J


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •