LoneZZ
Member
- Oct 8, 2011
- 56
- 1
Hey guys, sorry for always posting help with my PHP codes, but I only started trying to add things the day before yesterday, so I still have some difficulty writting and comparing the codes to one already done.
I don't know what's wrong with this code, I really don't know why it doesn't work..
<?php
$homeroom = mysql_query("SELECT home_room FROM users WHERE id = '".$_SESSION['user']['id']."' LIMIT 1");
$gethomeroom = mysql_fetch_array($homeroom);
$homename = mysql_query("SELECT caption FROM rooms WHERE id = '".$gethomeroom."' LIMIT 1");
$getname = mysql_result($homename, 1);
echo $getname;
?>
I'd really appreciate if someone could find the problem in this, and get a fix, thanks in advance.
I don't know what's wrong with this code, I really don't know why it doesn't work..
<?php
$homeroom = mysql_query("SELECT home_room FROM users WHERE id = '".$_SESSION['user']['id']."' LIMIT 1");
$gethomeroom = mysql_fetch_array($homeroom);
$homename = mysql_query("SELECT caption FROM rooms WHERE id = '".$gethomeroom."' LIMIT 1");
$getname = mysql_result($homename, 1);
echo $getname;
?>
I'd really appreciate if someone could find the problem in this, and get a fix, thanks in advance.