Jump to content
MakeWebGames

Recommended Posts

Posted

What I am trying to accomplish is to ;

a) get the count of players in "my" gang

b) get the count of players in the gang you want to declare on

c) if your gang has between 6 - 10 players then list only the gangs that have between 0 - 10 players, if your gang has between 11 - 20 players then list only the gangs that have between 11 -20 players, and so on

d) give an error message if you choose a gang that is not within your range.

I have tried a number of different ways to get this to work and so far no joy. Any suggestions or ideas would be greatly appreciated. Thanks.

Here is the code that I am working with.

 

{
echo "<form action='yourgang.php?action=staff&act2=declare' method='post'>
<center>Choose who to declare war on.</center><br />
<center><table id='table-1' cellspacing=\"0\" >
<input type='hidden' name='subm' value='submit' />
<tr><td>Fighting Unit: <select name='gang' type='dropdown'>";
$q=$db->query("SELECT * FROM gangs WHERE gangID != {$ir['gang']}");
while($r=$db->fetch_row($q))
{
echo "<option value='{$r['gangID']}'>{$r['gangNAME']}</option>\n";
}
echo "</select></td><td>
<input type='submit' value='Declare' /></form></tr></td></table></center>";
}

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