Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Not Solved php help
#1
Not Solved
Hi could you please check this code ad tell me why it doesn't work. It doesn't check the IP it just blocks the user!

functions_user.php
// REGIP = new param
        $query = $db->simple_select("users", "uid,username,password,salt,loginkey,usergroup,regip", "uid='".intval($uid)."'", array('limit' => 1));
        $user = $db->fetch_array($query);
    }
    if(!$user['salt'])
    {

member.php
elseif($user['usergroup'] == X || $user['usergroup'] == Y)
        {
            $currentip = $_SERVER['REMOTE_ADDR'];
            if ($currentip != $user['regip'])
             {
               $errors[] = "Cannot log you in!";
             }
        }

X and Y is where I put group ID


Messages In This Thread
php help - by marcus123 - 2013-09-25, 08:19 PM
RE: php help - by effone - 2013-09-26, 10:39 AM
RE: php help - by Matt - 2013-09-26, 11:04 AM
RE: php help - by spork985 - 2013-09-26, 11:46 AM
RE: php help - by marcus123 - 2013-09-26, 02:12 PM
RE: php help - by spork985 - 2013-09-26, 02:23 PM
RE: php help - by marcus123 - 2013-09-26, 03:26 PM
RE: php help - by spork985 - 2013-09-26, 03:35 PM
RE: php help - by marcus123 - 2013-09-26, 04:07 PM
RE: php help - by spork985 - 2013-09-26, 04:08 PM
RE: php help - by marcus123 - 2013-09-26, 04:15 PM

Forum Jump:


Users browsing this thread: 9 Guest(s)