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 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Aug 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Make someone register to your FORUM to view certain sections of your SITE?

    i want to add a log in thing to my site to enter areas like downloads

    however, i want the people who log in members of the forum. So in essence if you have a forum account u can log in

    how do you do this?

    i have an SMF forum and i have stuff like cPanel on my site

  • #2
    Senior Coder rafiki's Avatar
    Join Date
    Aug 2006
    Location
    Floating around somewhere...
    Posts
    2,042
    Thanks
    19
    Thanked 42 Times in 42 Posts
    you can change the setting with in the forum software, atleast you usually can right?

  • #3
    Regular Coder
    Join Date
    Mar 2007
    Location
    Quebec
    Posts
    261
    Thanks
    6
    Thanked 7 Times in 7 Posts
    just connect to the forum database and if the user is registered there then proceed with login. Not really hard. Simple MySQL query could determine it.
    PHP Code:
    <?php
    $sql 
    "SELECT * FROM table_name WHERE field_name='$field_name' AND field_name2='$field_name2'";
    $query mysql_query($sql) or die("Could not run query: " .mysql_erorr());
    if(
    $sql){
         
    allow access
    }else {
       
    no acces
    }
    ?>
    That is a very basic example but essentially is what needs to be done. Obviously I left a lot of stuff out but the main query is there.

  • #4
    New to the CF scene
    Join Date
    Aug 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    can someone help me out more

    i'm not sure where you insert member names and whatnot


  •  

    Posting Permissions

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