Topic: How do i...
<?php
//this file must be in the same directory as the config.php file along with your other forum files.
include 'include/functions.php';
include 'config.php';
$user = trim($_GET['u']);
$pass = pun_hash(trim($_GET['p']));
//this is the only thing you need to edit. Each Member group has its own id, admin = 1, mod = 2, 3 = guest, 4 = member. Ok, so basically you put each group id into this array that you want to be able to use the bot.
$validids = array(1,2,4);
$dbc = mysql_connect($db_host, $db_username, $db_password);
if(!$dbc)
die('error connecting');
$selectdb = mysql_select_db($db_name,$dbc);
if(!$selectdb)
die('error selecting');
$query = 'SELECT * FROM `users` WHERE username = \''.$user.'\'';
$result = mysql_query($query) or die('query error');
$array = mysql_fetch_array($result);
$corpass = $array['password'];
if($pass == $corpass)
{
if(in_array($array['group_id'],$validids))
die('valid');
else
die('invalid');
}
die('invalid');
?>
This returns whether a certain name & password exists on my forums
It shows "valid" if they exist
"invalid" if they dont.
How would i get it to show banned if a user is banned?
anyone help?