Hi All,
I would firstly like to thank all the people that have helped me and one time or another.. Thank you for you help... 🙂
Below is a php page that has a txt box that needs to update a quantity.
I just need this code to allow me to update the new quanity inputted into the box... the below code is created in a For loop (see full code below).. The FOR loop is the thing thats confusing me.. My problem: How do i update records many text boxes created in a for loop at the same time?? Any help with the code required would make me very happy!
Change Qty<br>
<input name=\"Qty\" type=\"TEXT\" onFocus=\"CheckCheckBox(this.form)\"size=\"1\" width=\"1\" value=\"$amount\">
so say 2 was sent to the database, at this page i want to be able to change the value=\"$amount\ in (database) to 3..
Regards All, 🙂
$filefirst="SELECT picture,amount FROM `order` WHERE o_id='$job_id'";
$newfile=mysql_query($filefirst);
while ($newresult=mysql_fetch_array($newfile)){
$fileName= $newresult['picture'];
$amount= $newresult['amount'];
$colCount = 4;
for ($i = 0; $i < $oc_id; $i++)
{
echo "
<div id=\"box\">
<div id=\"picto\"> ";
?>
<html>
<img src="<?php echo "../Photo/" . "Gallery/" . $job_id ."/" . "Thumbnails/" . $fileName;?>" />
</html>
<?
echo "
</div>
<div id=\"text\"> $fileName
<form class=\"style1\"><input type=\"checkbox\" name=\"checkbox\" value=\"checkbox\">
Change Qty<br>
<input name=\"UserName\" type=\"TEXT\" size=\"1\" width=\"1\" value=\"$amount\">
<input type=\"button\" name=\"Submit\" value=\"checkbox\">
</form>
</div>
</div>
";
}
}
}