Jump to content

if's


grlayouts

Recommended Posts

OK i have a market that displays all items,

 

i.e. steaks, price=100 sell how many?

 

how can i get the selling button to sell and take away from database.

 

<?php $title = "Consumer Market"; include("header.php"); ?>
<center>
Welcome to the market

<table width="100%" cellpadding="2" cellspacing="0" style="width:100%;height:95%;margin-top:10px;border:1px solid #5B84A4;">
  <tr bgcolor=#0F354C>
    <td width=30%>Item</td>
    <td width=20%>Price</td>
    <td wdith=30%>Item</td>
    <td width=20%>You can sell</td>
  </tr>
  <tr bgcolor=#5B84A4>
    <td>Drugs: </td>
    <td><? print"$stat[drugsell]";?></td>
    <td>Drugs: </td>
    <td><? print"$stat[drugs]";?></td>
  </tr>
  <tr bgcolor=#5B84A4>
    <td>Low riders: </td>
    <td>$0</td>
    <td>Low riders: </td>
    <td><? print"$stat[lows]";?></td>
  </tr>
  <tr bgcolor=#5B84A4>
    <td>Steaks: </td>
    <td>$0</td>
    <td>Steaks: </td>
    <td><? print"$stat[steaks]";?></td>
  </tr>
  <tr bgcolor=#5B84A4>
    <td>Beer: </td>
    <td>$0</td>
    <td>Beer: </td>
    <td><? print"$stat[beer]";?></td>
  </tr>
  <tr bgcolor=#5B84A4>
    <td>Bullets: </td>
    <td>$0</td>
    <td>Bullets: </td>
    <td><? print"$stat[bullets]";?></td>
  </tr>
  <tr bgcolor=#5B84A4>
    <td>Hummers: </td>
    <td>$0</td>
    <td>Hummers: </td>
    <td><? print"$stat[hums]";?></td>
  </tr>
  <tr bgcolor=#5B84A4>
    <td>Vests: </td>
    <td>$0</td>
    <td>Vests: </td>
    <td><? print"$stat[vests]";?></td>
  </tr>
  <tr bgcolor=#5B84A4>
    <td>Ak-47: </td>
    <td>$0</td>
    <td>Ak-47: </td>
    <td><? print"$stat[aks]";?></td>
  </tr>
</table>
<br />
        <table width="57%" height="11%" cellpadding="2" cellspacing="0" style="width:100%;height:95%;margin-top:10px;border:1px solid #5B84A4;">
          <tr bgcolor="#0F354C">
            <td width="30%"><div align="center">Item</div></td>
            <td width="20%"><div align="center">Amount to Sell</div></td>
          </tr>
          <tr bgcolor="#5B84A4">
            <td><div align="center">
              <select name="seller">
                <option value="1">Drugs</option>
              </select>
            </div></td>
            <td><div align="center">
              <table border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <td><input type="text" size="10" value="0" name="Amount" id="id1" />         </td>
                </tr>
                          </table>
              <? print"<input type=submit value=Change>"; ?></div></td>
            <form input name="ammount" id="ammount" value="0" size="10" maxlength="10">
            </form>
          </tr>
        </table>
        <br />
      </p>
    </td>
  </tr>
</table>

Link to comment
https://forums.phpfreaks.com/topic/46000-ifs/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.