1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Help Please !! Users login before being able to comment

Discussion in 'PHP' started by djguppy, Jul 19, 2008.

  1. #1
    Hi all, I am looking for a script that will only let users comment after they have logged in or registered. I have looked allmost everywhere and one doesnt seem to exist, or maybe im just notlooking hard enough. Please Help
     
    djguppy, Jul 19, 2008 IP
  2. Dirty-Rockstar

    Dirty-Rockstar Guest

    Messages:
    252
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #2
    assuming you already have the script to have users register use this


    
    
    if($_SESSION['logged_in'] == 1) {
    
    //what happens if you are logged in
    //assuming that the session name is called logged_in
    
    
    }
    else{
    
    
    //what happens if you are not logged in
    
    
    }
    
    
    PHP:
     
    Dirty-Rockstar, Jul 19, 2008 IP
    djguppy likes this.
  3. Barti1987

    Barti1987 Well-Known Member

    Messages:
    2,703
    Likes Received:
    115
    Best Answers:
    0
    Trophy Points:
    185
    #3
    Barti1987, Jul 19, 2008 IP