Hi.
I've found a simple shopping cart (1 PHP page).
Right now, it's working. But it only has 1 dropdown bar for the user to choose what they want to buy.
I need it to have 2-3 dropdown bars. I've added the dropdown bar, but the second one doesn't seem to add into the total.
Here is the code:
<html>
<body>
<br/>
<?php
// --------------------------------------------------
// This script was freely provided by
// http://www.eLouai.com
// Louai Munajim - scripts@elouai.com
// (Leave credit intact)
// --------------------------------------------------
extract($_GET);
extract($_POST);
if (!isset($amount))
{ // set default amounts
$amount="5";
// If you do not have a company id apply for
// one at MyPaySystems
$companyid="";// ADD YOUR COMPANY ID
}
?>
<center>
<table width="300" bgcolor="EEEEEE">
<form action="shoppingcart1.php" method="get">
<tr><td>
<table width="100%" bgcolor="A4E39F">
<tr><td>Donate</td></tr>
<tr><td bgcolor="DFFADA">
<table width="100%">
<tr><td>
Select Amount
</td><td>
<select name="amount">
<option value="2" <?php if ($amount==="2") echo "selected"?> >$2</option>
<option value="4" <?php if ($amount==="4") echo "selected"?> >$4</option>
<option value="6" <?php if ($amount==="6") echo "selected"?> >$6</option>
<option value="8" <?php if ($amount==="8") echo "selected"?> >$8</option>
</select>
<select name="amount">
<option value="1" <?php if ($amount==="1") echo "selected"?> >$1</option>
<option value="1.50" <?php if ($amount==="1.50") echo "selected"?> >$1.50</option>
<option value="2" <?php if ($amount==="2") echo "selected"?> >$2</option>
<option value="2.50" <?php if ($amount==="2.50") echo "selected"?> >$2.50</option>
</select>
</td><td>
<input type="submit" Value="ReCalculate">
</td></tr>
</table>
</td></tr>
</table><br/>
<table width="100%" bgcolor="A4E39F">
<tr><td>Checkout</td></tr>
<tr><td bgcolor="DFFADA">
<table width="100%">
<tr><td>Total: $<?php echo $amount;?></td>
<td align="center">
<a href="https://secure.paysystems1.com/cgi-v310/payment/onlinesale-tpppro.asp?product1=donation&companyid=<?php echo $companyid;?>&total=<?php echo $amount;?>&formget=N&redirect=http://www.elouai.com/success.php&redirectfail=http://www.elouai.com/fail.php&reoccur=N"><img border=0 src="butcc.gif"></a>
</td></tr>
</table>
</td></tr>
</table>
</td></tr>
</form>
</table>
</center>
</body>
</html>
I'm not quit sure what to do or to look for. Any help is always greatly appreciated!