Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Apr 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    prevent viewing until registration html codes

    HI to all

    please i need html code that prevent visitor from viewing the content

    until registration

    best of luck for all

  • #2
    New Coder
    Join Date
    Mar 2009
    Posts
    25
    Thanks
    3
    Thanked 0 Times in 0 Posts
    This can be accomplished easily in PHP especially if you have a log in script. This piece of code is placed at the top of documents to keep people from getting access to pages if they are not logged in.
    Code:
    <?php
    session_start();
    if (!isset($_SESSION['user']))
    {
    header("Location: login.php");
    }
    ?>


  •  

    Posting Permissions

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