Jump to content

Problem with criminal.php V2


Recommended Posts

include "globals.php";
if($ir['jail'] or $ir['hospital']) { die("This page cannot be accessed while in jail or hospital."); }
$q2=$db->query("SELECT * FROM crimes ORDER BY crimeBRAVE ASC");
while ($r2=$db->fetch_row($q2))
$q=$db->query("SELECT * FROM crimegroups ORDER by cgORDER ASC");
print "[b]Criminal Centre[/b]

<table width='75%' cellspacing=1 class='table'><tr><th>Crime</th><th>Cost</th><th>Do</th></tr>";
print "<tr><td colspan='3' class='h'>{$r['cgNAME']}</td></tr>";
foreach($crimes as $v)
if($v['crimeGROUP'] == $r['cgID'])
print "<tr><td>{$v['crimeNAME']}</td><td>{$v['crimeBRAVE']} Nerve</td><td>[url='docrime.php?c={$v[']Do[/url]</td></tr>";
print "</table>";


im getting the error message,

Warning: Invalid argument supplied for foreach() in /home/hosting4/public_html/crimecounty/criminal.php on line 16



What do i do ? any idea's thanks :-D

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.

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...