Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Q&A
[PHP] Auto logout when ip-banned, what's wrong wit hthe code?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="thewicard" data-source="post: 188814" data-attributes="member: 8814"><p>Hey, I try to make a code that makes people automaticly logout if ip-banned, (made for Phoenix, RevCMS) It won't work and I don't see what's wrong with it?</p><p> </p><p>[PHP]<?php</p><p>$my_id = $_SESSION['user']['id'];</p><p>$is_reg_banned = mysql_query("SELECT ip_last FROM users WHERE id = '".$my_id."'") or die(mysql_error());</p><p>$is_last_banned = mysql_query("SELECT ip_reg FROM users WHERE id = '".$my_id."'") or die(mysql_error());</p><p>$if_reg_banned = mysql_query("SELECT value FROM bans WHERE value = '".$fetch_if_reg_banned."'") or die(mysql_error());</p><p>$if_last_banned = mysql_query("SELECT value FROM bans WHERE value = '".$fetch_if_last_banned."'") or die(mysql_error());</p><p> </p><p>if($if_reg_banned == $is_reg_banned){?></p><p><meta http-equiv="refresh" content="0; URL=logout"></p><p><?php</p><p>}</p><p>?><?php</p><p>if($if_last_banned == $is_last_banned){?></p><p><meta http-equiv="refresh" content="0; URL=logout"></p><p><?php</p><p>}</p><p>?>[/PHP]</p></blockquote><p></p>
[QUOTE="thewicard, post: 188814, member: 8814"] Hey, I try to make a code that makes people automaticly logout if ip-banned, (made for Phoenix, RevCMS) It won't work and I don't see what's wrong with it? [PHP]<?php $my_id = $_SESSION['user']['id']; $is_reg_banned = mysql_query("SELECT ip_last FROM users WHERE id = '".$my_id."'") or die(mysql_error()); $is_last_banned = mysql_query("SELECT ip_reg FROM users WHERE id = '".$my_id."'") or die(mysql_error()); $if_reg_banned = mysql_query("SELECT value FROM bans WHERE value = '".$fetch_if_reg_banned."'") or die(mysql_error()); $if_last_banned = mysql_query("SELECT value FROM bans WHERE value = '".$fetch_if_last_banned."'") or die(mysql_error()); if($if_reg_banned == $is_reg_banned){?> <meta http-equiv="refresh" content="0; URL=logout"> <?php } ?><?php if($if_last_banned == $is_last_banned){?> <meta http-equiv="refresh" content="0; URL=logout"> <?php } ?>[/PHP] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
[PHP] Auto logout when ip-banned, what's wrong wit hthe code?
Top