Closed Thread
Results 1 to 3 of 3

Thread: Making a page only visible after logon

  1. #1
    Alex_j is offline Newbie
    Join Date
    Nov 2009
    Posts
    29
    Rep Power
    0

    Making a page only visible after logon

    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?

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    Jaan Guest

    Re: Making a page only 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.

  4. #3
    Flezria is offline Learning Programmer
    Join Date
    Sep 2009
    Posts
    55
    Rep Power
    0

    Re: Making a page only visible after logon

    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:

    Code:
    if($_SESSION['login'] == yes) {
               include "Yoursite.php";
    }else {
               echo "You arent logged in!!";
    }
    remember to set the session_start();
    before using session variables

    Good luck, Flezria

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. url should not be visible to client
    By urvashi in forum C# Programming
    Replies: 0
    Last Post: 08-05-2010, 02:20 AM
  2. Making a Web page with subliminal messages
    By Dantalion in forum HTML Programming
    Replies: 15
    Last Post: 06-14-2010, 02:42 PM
  3. Making a 3 main content page
    By pinstripe05 in forum JavaScript and CSS
    Replies: 4
    Last Post: 05-10-2010, 10:10 AM
  4. Help me how to making a page load itself into a new popup window ???
    By love4all1080 in forum JavaScript and CSS
    Replies: 3
    Last Post: 03-18-2009, 03:56 AM
  5. More Visible Sourecode Section
    By MeTh0Dz in forum The Lounge
    Replies: 45
    Last Post: 09-04-2008, 01:44 PM

Tags for this Thread

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