Jump to content
MakeWebGames

Recommended Posts

Posted

I have not done anything to the file but i get the error:

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

 

I am not sure how to fix this so i thought i'd see if you guys could help in any way, thanks in advance.

Posted

Re: criminal.php

lol, thanks, i'm only just starting php.

before:

}
$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>";

 

and after:

{
if($v['crimeGROUP'] == $r['cgID'])
{
print "<tr><td>{$v['crimeNAME']}</td><td>{$v['crimeBRAVE']} Brave</td><td>[url='docrime.php?c={$v[']Do[/url]</td></tr>";
}
}
}
print "</table>";

 

do you need the actual line of code that's wrong?

Posted

Re: criminal.php

rofl, ok xD

 

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']} Brave</td><td>[url='docrime.php?c={$v[']Do[/url]</td></tr>";
}
}
}
print "</table>";
$h->endpage();
?>

 

[me=daddytednips]crosses fingers lol[/me]

Posted

Re: criminal.php

I had this problem before, it was because i had crime groups with no crimes in those groups, all you need to do is make sure each group has a crime, then your ok

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