Jump to content

Drakken_

Members
  • Posts

    3
  • Joined

  • Last visited

Drakken_'s Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Fixed the error reporting, although doesn't fix the problem. What did I turn off in index.php? Username is defined on the 8th line of index.php $username = mysql_real_escape_string($_GET["p"]); What is register_globals? That isn't present in the code..
  2. So I have this code that checks if a user if banned on the website or not (Through a MySQL database) However, this code that DID IN FACT work, is not working anymore. Whenever I try to check if a player is banned, that I know for sure are banned, they show up as not banned. I have no clue what happened to change the way it works, but all I know is that is doesn't work anymore. Here is what I have: config.inc.php: <?php session_start(); error_reporting(1); mysql_connect("localhost", "root", "<hidden>")or die("DB connection failed: " . mysql_error()); mysql_select_db("bridge")or die("DB selection failed"); ?> index.php: <?php require_once("config.inc.php"); error_reporting(0); $action = $_GET["a"]; if ($action=="checkban"){ $player = $_GET["p"]; $username = mysql_real_escape_string($_GET["p"]); $result = mysql_query("SELECT * FROM player_bans WHERE UPPER(player_bans) = UPPER('$username') LIMIT 1"); $row = mysql_fetch_array($result); if ($row["banned"] == 1){ echo("success"); //send(array($row)); } else { echo("failiure<br />"); echo($row["banned"]); } } ?> Here is the player_bans table as well:
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.