newttster Posted April 16, 2013 Posted April 16, 2013 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>"; } Quote
newttster Posted April 17, 2013 Author Posted April 17, 2013 What's this... here You're welcome :) Once again you came through. Thanks a bunch! :D Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.