new value overwriting the previous values

pinggames64

New Member
Ok so i have this javascript\[code\]function getpreconfigproducts(str1,str2){var url="ajax_preconfig_products.php?";url=url+"id="+str1+"&cid="+str2;xmlHttp = GetXmlHttpObject(stateChangeHandler);xmlHttp_Get(xmlHttp, url);return false;}\[/code\]and it calls this php\[code\]<?php if($_GET['id']!=''){ $sql="SELECT * FROM productinfo WHERE ProductID=".$_GET['id']." AND Status=1"; $pro=ExecuteGetRows($sql);?><p>Qty: <input type="input" name="qty[]" id="fpro[]" value="http://stackoverflow.com/questions/3911067/1" style="width:15px; margin-top:-3px;" /> <label><?php echo $pro[0]['ProductName'];?></label> </p><?php echo "^_^"; echo ",".$pro[0]['ProductID']; } ?>\[/code\]which generates this \[code\]<div class="fields"><h2>Final Products</h2><p id="finalproductsid"> <p>Qty: <input name="qty[]" id="fpro[]" value="http://stackoverflow.com/questions/3911067/1" style="width: 15px; margin-top: -3px;" type="input"> <label>FIREBOX S5510 15</label> </p> <p>Qty: <input name="qty[]" id="fpro[]" value="http://stackoverflow.com/questions/3911067/1" style="width: 15px; margin-top: -3px;" type="input"> <label>FIREBOX S5510 15</label> </p></p></div>\[/code\]The problem is that if a user changes the input qty[] to say 5 and adds another product it reverts back to 1 ...any ideas how i can address this
 
Back
Top