Could use some help

Image : http://i1362.photobucket.com/albums/r697/ricky_rosa1/Game_zps9a5a45f6.png

The code below trying to make

[php]echo “

<a href=$PHP_SELF?action=buy&amount=1&gem=$i&price=$buyprice>Buy 1”;
echo “<a href=$PHP_SELF?action=sell&amount=1&gem=$i&price=$buyprice>Sell 1”;[/php]

which you can see from the image into a Input where users can input whatever amount they want to buy or sell. With it those two line codes connect to the 5 items as its set up that way so the input box cant effect that the code for the complete transaction has to connect to them so if a user puts in 2 for each box the complete transaction button will know they bought a total of 10 items and it needs to know if its a buy or a sell that the user is asking as well as in case a user puts 1 for one item in buy and a 5 in sell for a item itll know that transaction. But i dont know how to do that lol I hope someone can help

  • it cant effect the layout meaning ruining it so the box for the input has to replace Buy 1/Sell 1*

[php]$gemname=$stockdata[gemname][$i];
$saleprice=ceil($stockdata[baseprice][$i](1+$spread));
$buyprice=ceil($stockdata[baseprice][$i]
(1-$spread));
$amount=$stockdata[amount][$i];
echo “

$gemname $saleprice $buyprice”;
if ($playerinfo[status]==5) echo “$amount”;
echo “<a href=$PHP_SELF?action=buy&amount=1&gem=$i&price=$buyprice>Buy 1”;
echo “<a href=$PHP_SELF?action=sell&amount=1&gem=$i&price=$buyprice>Sell 1”;
echo “$amount”;
echo “”;
}
echo “”;
echo(’ '); [/php]
Sponsor our Newsletter | Privacy Policy | Terms of Service