View Full Version : Make someone register to your FORUM to view certain sections of your SITE?
08-03-2007, 01:41 AM
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
08-03-2007, 01:42 AM
you can change the setting with in the forum software, atleast you usually can right?
08-03-2007, 05:15 AM
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.
$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());
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.
08-03-2007, 07:45 PM
can someone help me out more
i'm not sure where you insert member names and whatnot
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.