Results 1 to 2 of 2

Thread: Require login to access detail page

  1. #1
    Join Date
    Aug 2001
    Location
    Indonesia
    Posts
    3,732

    Default Require login to access detail page

    This morning hart_house send me yahoo msg and we chat a few. He asked me about how to force users to login before see detail page.


    put it in detail.php at bottom after line
    include($theme_path."msg.php");

    -----------------------------------------

    PHP Code:
      // check login

      
    $users_obj = new clsUsers;
      
    $users_obj->InitDB($dbServer,$dbHostname,$dbUsername,$dbPassword,$dbName);
      
    $users_obj->table_name "idx_users";

      if(!
    $users_obj->GetUserAuthentication()==0){
        
    $back_url urlencode("detail.php?id=$id");
        
    header("Location: login.php?f=1&b=$back_url");
      } 

  2. #2
    Join Date
    Apr 2003
    Location
    Atlanta GA
    Posts
    3,395

    Default

    esm
    "The older I get, the more I admire competence, just simple competence, in any field from adultery to zoology."

    .

Similar Threads

  1. affiliate link in url on detail page
    By morgankd in forum v5.x
    Replies: 4
    Last Post: 05-19-2004, 11:52 PM
  2. Replies: 7
    Last Post: 01-04-2004, 08:19 AM
  3. Random 10 links on Detail page.
    By at00m in forum v3.2
    Replies: 11
    Last Post: 12-04-2003, 11:38 AM
  4. Make your detail page spidered
    By Shophere in forum v3.2
    Replies: 36
    Last Post: 11-26-2003, 02:30 AM
  5. Detail page instead of URL directly.
    By daweb in forum v5.x
    Replies: 5
    Last Post: 07-12-2003, 09:59 AM

Posting Permissions

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