Forum Moderators: coopster
...rname = $_SESSION['username'];
$result2 = mysql_query("SELECT * FROM userbought WHERE username='$username' ") or die(mysql_error());
while($r2 = mysql_fetch_array($result2)) { $btname = $r2['item']; }
$result3 = mysql_query("SELECT * FROM items WHERE name='$btname' ORDER BY id ASC") or die(mysql_error());
while($r3 = mysql_fetch_array($result3)) {
$id = $r3['id'];
$name = $r3['name'];
$icon = $r3['icon'];
$desc = $r3['desc'];
$cost = $r3['cost'];
$icon = str_replace("[img-locker]","",$icon);
$icon = str_replace("[image]","<img src='",$icon);
$icon = str_replace("[/image]","' border='0' width='16' height='16' style='cursor:pointer;' />",$icon);
$num == 0;
if ($num & 1)
{
$num += 1;?>
<tr sty... EDIT:
I fixed the problem by changing the code verrry slightly.
I have edited the codes to show what I changed.
...rname = $_SESSION['username'];
$result2 = mysql_query("SELECT * FROM userbought WHERE username='$username' ") or die(mysql_error());
while($r2 = mysql_fetch_array($result2)) { $btname = $r2['item'];
$result3 = mysql_query("SELECT * FROM items WHERE name='$btname' ORDER BY id ASC") or die(mysql_error());
while($r3 = mysql_fetch_array($result3)) {
$id = $r3['id'];
$name = $r3['name'];
$icon = $r3['icon'];
$desc = $r3['desc'];
$cost = $r3['cost'];
$icon = str_replace("[img-locker]","",$icon);
$icon = str_replace("[image]","<img src='",$icon);
$icon = str_replace("[/image]","' border='0' width='16' height='16' style='cursor:pointer;' />",$icon); }
$num == 0;
if ($num & 1)
{
$num += 1;?>
<tr sty... [edited by: NogginAnimations at 9:07 am (utc) on Jan. 25, 2008]