I'm working on a game, and i have some problems about the user profiles..
$query = "SELECT * FROM users WHERE name='".mysql_real_escape_string($_POST['$name'])."'";
That's the line I'm using to get my user information, but the problem is that it doesnt work.
I tried using:
$query = "SELECT * FROM users WHERE id='".mysql_real_escape_string($_SESSION['user_id'])."'";
But obviously this only showed me for the user currently logged on (the user himself)...
anyhow i have some different tables in MySQL, where one being name.
Thanks in advance