...

View Full Version : Make someone register to your FORUM to view certain sections of your SITE?



animesector
08-03-2007, 12: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

rafiki
08-03-2007, 12:42 AM
you can change the setting with in the forum software, atleast you usually can right?

fl00d
08-03-2007, 04: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.


<?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.

animesector
08-03-2007, 06:45 PM
can someone help me out more

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



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum