Results 1 to 3 of 3

Thread: Blocking pages

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2007
    Posts
    1

    Question Blocking pages

    I'm have created a login system and all but it's gonna seem pointless if you can't do anything special. What I'm going to do is block some of the pages for non-members. How do I do that?

  2. #2
    PowerPoster kfcSmitty's Avatar
    Join Date
    May 2005
    Posts
    2,248

    Re: Blocking pages

    I don't think you technically block pages using PHP.

    Based upon whether the session is active or not, you display something different to the screen.

  3. #3
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: Blocking pages

    Once you have checked the users password and ID you can set a session variable containing the user ID. You can then put a piece of code at the top of each page to check the variable exists, if it does not redirect to the login page.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

Posting Permissions

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



Click Here to Expand Forum to Full Width