Posted on Friday 5th September 2008 at 05:57 AM
Ok i have the user system and put in the shop and the advanced 1 with , staffonly etc...
I want to get people to type the amount of bullets and it randomly chooses health to take off, but ive got that working! all i need is to choose your weapon from a drop down list but so far i cant get the items to come up :/
this is my code for it so far
Any idea's ?
I want to get people to type the amount of bullets and it randomly chooses health to take off, but ive got that working! all i need is to choose your weapon from a drop down list but so far i cant get the items to come up :/
this is my code for it so far
Code
default:
echo ("Choose who to Attack!<br>
<form method='post' action='?page=fire'>
<select name='username' class='usernameandpassword'>");
$fetch = mysql_query("SELECT * FROM `members`");
while ($user = mysql_fetch_array($fetch))
{
echo ("<option value='$user[username]' class='usernameandpassword'>$user[username]</option><br>");
}
echo ("<select name='weapon' class='usernameandpassword'>");
$get_users_items = mysql_query("SELECT * FROM `users_shop_items` WHERE `owner` = '$logged[username]';"); //get users items
while($items = mysql_fetch_array($get_users_items))
{
echo ("<option value='$items[name]' class='usernameandpassword'>$items[name]</option>");
}
echo ("
</select><br>
</select><br>
Enter amount of bullets going to be used<br>
<input type='text' name='bullets' size='20' class='usernameandpassword'>
<input type='submit' name='submit' value='Send' class='usernameandpassword'>");
break;
echo ("Choose who to Attack!<br>
<form method='post' action='?page=fire'>
<select name='username' class='usernameandpassword'>");
$fetch = mysql_query("SELECT * FROM `members`");
while ($user = mysql_fetch_array($fetch))
{
echo ("<option value='$user[username]' class='usernameandpassword'>$user[username]</option><br>");
}
echo ("<select name='weapon' class='usernameandpassword'>");
$get_users_items = mysql_query("SELECT * FROM `users_shop_items` WHERE `owner` = '$logged[username]';"); //get users items
while($items = mysql_fetch_array($get_users_items))
{
echo ("<option value='$items[name]' class='usernameandpassword'>$items[name]</option>");
}
echo ("
</select><br>
</select><br>
Enter amount of bullets going to be used<br>
<input type='text' name='bullets' size='20' class='usernameandpassword'>
<input type='submit' name='submit' value='Send' class='usernameandpassword'>");
break;
Any idea's ?