Jump to content
MakeWebGames

Tables...


DELETE-ME-NOW-

Recommended Posts

Im in need of a little noob help :)

Im trying to make a gym memberships MOD for my game (First mod), and ive got everything nearly done, but then i come to the table part where to view the available gyms... None of the gyms are showing up even after i have added them to phpMyadmin

Heres my table:

echo"
<table width='90%' cellspacing=1 class='table'><tr><th>Gym Name</th> <th>Cost Per Week</th> <th>Level</th> <th>Join</th></tr>";
while($r=$db->fetch_row($q))
{
print "<tr><td align='center' colspan='5' class='h'> [b]{$r['gymgroupNAME']}[/b]</td></tr>";
foreach($crimes as $v)
{
if($v['gymGROUP'] == $r['gymgroupID']) 
{
print "<tr> <td>{$v['gymNAME']}</td> <td>{$v['gymCOST']}</td> <td>{$v['gymLEVEL']}</td>  <td><div class='perform_btn'>[url='joingym.php?c={$v[']Join[/url]</div></td> </tr>";
}
}
}
print "</table>";

 

I know this is probably something simple, as im still a noob. Can someone please point ot to me where i am going wrong?

Thanks!

Link to comment
Share on other sites

<?php
include 'globals.php';

if($ir['donatordays'] < 1)
{
die('This is for donators only!');
}

echo'
Welcome to the gym membership hall!
';
if($ir['gym'] > 1)
{
echo" You are currently a member of XXX gyms!";
}
else
{
echo" You are not a member of any gym at the momment. Please join one of the gyms below!";
}
echo"
<table width='90%' cellspacing=1 class='table'><tr><th>Gym Name</th> <th>Cost Per Week</th> <th>Level</th> <th>Join</th></tr>";
while($r=$db->fetch_row($q))
{
print "<tr><td align='center' colspan='5' class='h'> [b]{$r['gymgroupNAME']}[/b]</td></tr>";
foreach($crimes as $v)
{
if($v['gymGROUP'] == $r['gymgroupID']) 
{
print "<tr> <td>{$v['gymNAME']}</td> <td>{$v['gymCOST']}</td> <td>{$v['gymLEVEL']}</td>  <td><div class='perform_btn'>[url='joingym.php?c={$v[']Join[/url]</div></td> </tr>";
}
}
}
print "</table>";
$h->endpage();
?>

 

Not really much too it the now lol... This code i just started :)

Link to comment
Share on other sites

I don't have my domain up anymore so I am trying to go on by not testing it why at line 9 its ' after echo and not " line 10 too. When you are trying this do you have donator days? You made it for only donator days poeple can look at it... if($ir['gym'] > 1) would be better if.. if($ir['donatordays'] < 1) ?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...