Hender
King Tinkerer
Hello, so in my RP, peoples stats are in rp_stats table.
Their username, look etc is stores in the users table.
So in my code, it calls information from users perfectly.
but it doesn't call information from rp_stats if i use the same ".$_SESSION['user']['id']." function.
If i change it to an ID, it calls the information.
I just can't use the ".$_SESSION['user']['id']." function twice.
What can i do to fix this?
Their username, look etc is stores in the users table.
So in my code, it calls information from users perfectly.
but it doesn't call information from rp_stats if i use the same ".$_SESSION['user']['id']." function.
If i change it to an ID, it calls the information.
I just can't use the ".$_SESSION['user']['id']." function twice.
What can i do to fix this?
PHP:
<?php
$getuser = mysql_query("SELECT * FROM users WHERE id = '".$_SESSION['user']['id']."'");
$stats = mysql_fetch_array($getuser);
$credits = $stats['credits'];
$look = $stats['look'];
$motto = $stats['motto'];
$getuserstats = mysql_query("SELECT * FROM rp_stats WHERE id = '".$_SESSION['user']['id']."'");
$userstats = mysql_fetch_array($getuserstats);
$bank = $userstats['bank'];