setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); session_start(); $user = $_SESSION["username"]; if(!isset($_SESSION["username"])){ header("location:index.php"); }else{ header('HTTP/1.1 200 OK', true, 200); } $cursor = $MySQLdb->prepare("SELECT * FROM users WHERE username=:username"); $cursor->execute( array(":username"=>$_SESSION["username"]) ); if($row = $cursor->fetch()){ $money = $row["money"]; } ?>
username:
ip address