Hi I am trying to alter a standard shopping cart script to suit my needs, but I am stuck at a couple of importnat points. I am fairly new to php and javascript and this excercise is taking me beyound my abilities. I do not want to abandan this project as I have spent alot of time and effort updating this. So if any input from you guys will be much appreciated. Here it goes. The page below, starts by listing 6 columns: qty (that customer wishes to order) Price each (The price for a single item, looked up form adtabase) Price Break, % Discount (will be in the form 1-5 ,12% 6-9 ,20% etc etc. looked up from databse) partnumber (lookedup from database) product discription ((lookedup from database) Remove (to remove the item from databse, javascript) The importnat columns are "qty" and "price Break, % discounts" What this does is to list quantity from numbers 1 to 5 (for customer to choose qty from the list) then price to shwo for single item. price break down to show the range of price breaks and how much discount they get for each item chosen. At the monet that works well, up to now. Ideally what I wish to happen is for customer to choose what price range they wish to purchase then display the qty for that particular price range. e.g. initially you would have qty :1 to 5 price brake say: 1-5, 0%, 6-9, 15%, 10-49, 33% ( these number can change and come from database) Now when a customer selects a different price range , for larger item orders, (say 50-100, 50%) I would like the qty (for that particular item) to start from 50 and list until 100 , for customer to choose one from list. I will then be able to output the relevant discounted price. Here is most of teh relevant codes. please do not hesitate to to ask me for further info. <html> <head> <title> Your Shopping Cart </title> <script language="JavaScript"> function UpdateQty(item) { itemId = item.name; newQty = item.options[item.selectedIndex].text; document.location.href = 'cartnew.php?action=update_item&id='+itemId+'&qty='+newQty; } function range(x) { var string = x.options[x.selectedIndex].text; //document.write((string.split("-",1)) + "<br />") var stringArray=string.split("-"); //document.write ((stringArray[0]) + "<br />"); var start=(stringArray[0]); //document.write(start); var end1=(stringArray[1]); //document.write(end1); var endstringArray=end1.split(" "); var end=(endstringArray[0]); //document.write(end); var selObj = document.getElementById('price_break'); var txtIndexObj = document.getElementById('txtIndex'); var selIndex = selObj.selectedIndex; //document.write(selIndex); document.location.href = 'cartnew.php?start='+start+'&end='+end; } </script> </head> <body bgcolor="#ffffff"> <h1><font color="#255699">Your Shopping Cart</font></h1> <h1><font color="#255699"> <?php $startnumber=($_GET["start"]); $endnumber=($_GET["end"]); echo "startnumber= ".$startnumber; echo "endnumber= ".$endnumber; ?> </font></h1> <form name="frmCart" method="get" > <table width="100%" cellspacing="0" cellpadding="0" border="0"> <tr bgcolor="#255699"> <td width="7%" height="25" > <font face="verdana" size="1" color="white"> <b>Qty</b> </font> </td> <td width="10%" height="25" > <font face="verdana" size="1" color="white"> <b>Price Each</b> </font> </td> <td width="23%" height="25" > <font face="verdana" size="1" color="white"> <b>Price Break, % Discount </b> </font> </td> <td width="11%" height="25" bgcolor="#255699"> <font face="verdana" size="1" color="white"> <b>Part Number </b> </font> </td> <td width="38%" height="25" bgcolor="#255699"> <font face="verdana" size="1" color="white"> <b>Product Discription </b> </font> </td> <td width="11%" height="25""> <font face="verdana" size="1" color="white"> <b>Remove?</b> </font> </td> </tr> <?php while($row = mysql_fetch_array($result)) { // Increment the total cost of all items $totalCost += ($row["qty"] * $row["price_each1"]); ?> <tr> <td width="7%" height="25"> <font face="verdana" size="1" color="black"> <select name="<?php echo $row["itemId"]; ?>" onChange="UpdateQty(this)"> <?php if ($startnumber==0) { $startnumber=1; $endnumber=5; } for($i = $startnumber; $i <= $endnumber; $i++) { echo "<option "; if($row["qty"] == $i) { echo " SELECTED "; } echo ">" . $i . "</option>"; } ?> </select> </font> </td> <td width="10%" height="25"> <font face="verdana" size="1" color="black"> £<?php echo number_format($row["price_each1"], 2, ".", ","); ?> </font> </td> <td width="23%" height="25" > <font face="verdana" size="1" color="red"> <select name="price_break" size="1" onChange="range(this)"> <?php /* for($i = 1; $i <= 8; $i++) { echo "<option "; if($startnumber == $i) { echo " SELECTED "; } echo ">" . $i . "</option>"; } */ /* $c=$row["price_each1"];// price for single item for($i = 1; $i <= 8; $i++) { echo "<option> "; echo $row[("price_break".$i)]; if ($i !=1) { $b=$row["price_each".$i]; $d=(($c-$b)/$c)*100; echo " ," .round($d)."%";} echo "</option>"; } */ $c=$row["price_each1"];// price for single item for($i = 1; $i <= 8; $i++) { $b=$row["price_each".$i]; $d=(($c-$b)/$c)*100; echo "<option> "; echo $row[("price_break".$i)]. " ," .round($d)."%" . "</option>"; } ?> </select> </font> </td> <td width="11%" height="25"> <font face="verdana" size="1" color="black"> <?php echo $row["part_number"]; ?> </font> </td> <td width="38%" height="25"> <font face="verdana" size="1" color="black"> <?php echo $row["disc"]; ?> </font> </td> <td width="11%" height="25"> <font face="verdana" size="1" color="black"> <a href="cart.php?action=remove_item&id=<?php echo $row["itemId"]; ?>">Remove</a> </font> </td> </tr> <?php } // Display the total ?> <tr> <td colspan="6"> <hr size="1" color="red" NOSHADE> </td> </tr> <tr> <td colspan="2"> <font face="verdana" size="1" color="black"> <a href="orders.php"><strong><< Keep Shopping</strong></a> </font> </td> <td colspan="2"> <font face="verdana" size="2" color="black"> <b>Total: £<?php echo number_format($totalCost, 2, ".", ","); ?></b> </font> </td> <td align="center" colspan="4"> <a href="../HiQFM2-0/test.php?totalCost=<?php echo number_format($totalCost, 2, ".", ","); ?> "> <strong>Finished Ordering >></strong></a> </td> </tr> </table> </form> </body> </html> <?php } ?> The problems I have is a) I can not set both the start and stop limits of the qty and have the quantity break remember what I have chosen when the page gets refreshed b) when I set the qty start and stop limits, all teh products get changed rather than the one I am applying the changes too. thanks for your help