hallsofvallhalla
08-05-2008, 02:43 PM
Hello everyone, sweet forums, quick question.
I have a table on a database of say items. Its a inventory.
<?php
echo "<big>Weapons For Sale</big>";
$getgoods="SELECT * from equipment where type = 'Weapon' order by Price";
$getgoods2=mysql_query($getgoods) or die("Could not fetch Weapons");
print "<table border='4' bordercolor='black' bgcolor='white'>";
print "<tr><td>Name</td><td>Type</td><td>Rating</td><td>Speed</td><td>Amount Available</td><td>Price</td></tr>";
while($getgoods3=mysql_fetch_array($getgoods2))
{
print "<tr><td>$getgoods3[Name]</td><td>$getgoods3[Type]</td><td>$getgoods3[Rating]</td><td>$getgoods3[Speed]</td><td>$getgoods3[amountavail]</td><td>$getgoods3[Price]</td></tr>";
}
print "</table>";
?>
This just basically lists all the weapons in the table.
ok now i want the player to be able to select a weapon by simply clicking on the name. It could then pass the variable to another page where it asks are you sure you want to buy this weapon, blah blah.
Thanks for any help.
I have a table on a database of say items. Its a inventory.
<?php
echo "<big>Weapons For Sale</big>";
$getgoods="SELECT * from equipment where type = 'Weapon' order by Price";
$getgoods2=mysql_query($getgoods) or die("Could not fetch Weapons");
print "<table border='4' bordercolor='black' bgcolor='white'>";
print "<tr><td>Name</td><td>Type</td><td>Rating</td><td>Speed</td><td>Amount Available</td><td>Price</td></tr>";
while($getgoods3=mysql_fetch_array($getgoods2))
{
print "<tr><td>$getgoods3[Name]</td><td>$getgoods3[Type]</td><td>$getgoods3[Rating]</td><td>$getgoods3[Speed]</td><td>$getgoods3[amountavail]</td><td>$getgoods3[Price]</td></tr>";
}
print "</table>";
?>
This just basically lists all the weapons in the table.
ok now i want the player to be able to select a weapon by simply clicking on the name. It could then pass the variable to another page where it asks are you sure you want to buy this weapon, blah blah.
Thanks for any help.