sure mate.
Weapon Type Cost Strength
longsword attack 250 500 aquantity: :
battleaxe attack 400 750 aquantity: :
crossbow attack 100 100 aquantity:
this is gotten by this code-
echo '<table width="95%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td align="center"><b>Weapon</b></td>
<td align="center"><b>Type</b></td>
<td align="center"><b>Cost</b></td>
<td align="center"><b>Strength</b></td>
</tr>
<form action="index.php?mode=armoury" method="POST">';
while ($armoury = mysql_fetch_array($aresult))
{
echo '<tr>
<td align="center">'.$armoury['weapon_name'].'</td>
<td align="center">'.$armoury['weapon_type'].'</td>
<td align="center">'.$armoury['weapon_cost'].'</td>
<td align="center">'.$armoury['weapon_strength'].'</td>
<td align="center">
aquantity: <input type="integer" name="Quantity" size="10" name="quantity" />:<br />
<input type="hidden" name="this_mode" value="true" />
<br />
</tr>';
}
echo '<input type="submit" value="Buy" /></form>';
}
i need to reference the weapon cost when subtracting it from the users gold. therefore i need to reference "aquantity" too. as it is the same name for all the boxes, i figured a loop is the best way to keep em seperate.
then i need to reference weapon strength and multiply it with the quantity and add that to the user table. got no idea how to reference them.
in pascal (lol) it would look like
armoury[counter].cost etc.
no idea for php though lol.