Jump to content
MakeWebGames

Recommended Posts

Posted
<?php
$macropage="criminal.php";
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))
{
$crimes[]=$r2;
}
$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>";
while($r=$db->fetch_row($q))
{
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>";
$h->endpage();
?>

 

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

Posted

Re: Problem with criminal.php V2

have you created any crime groups yet? if not create some and put some crimes into them, and that should fix your problem

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