This is the form:
[IMG]
This is mysql:
[IMG]
Here are my code so far:
[code=php]
<script>
function changeDisplaycola(flag)
{
if (flag) { document.getElementById(‘cola’).disabled = false; }
else { document.getElementById(‘cola’).disabled = true; }
}
function myPopupcola() {
window.open( “http://farm6.static.flickr.com/5219/5447354652_660c609ae1_m.jpg”, “myWindow”,
“status = 1, height = 200, width = 250, resizable = 0″ )
return false;
}
</script>
<td>
<input name=”Menu[]” type=”checkbox” value =”Dolly Cola” onclick=”changeDisplaycola(this.checked)”/></td>
<td class=”style11″ style=”width: 247px; “> Dolly Cola
<input name=”btncola” src=”http://ocw.ksu.edu.tw/file.php/249/openclipart/album/TzeenieWheenie/TzeenieWheenie_Small_blue_i_info_button.png” type=”image” onclick=”return myPopupcola()” height=”20″ width=”20″/></td>
<td style=”width: 92px” class=”style10″ > RM 2.50 </td>
<td style=”width: 98px” class=”style10″>
<select name=”Quantity” class=”ff” id=”cola” disabled=”disabled” style=”width: 37px”>
<option value=”0″>0</option>
<option value=”1″>1</option>
<option value=”2″>2</option>
<option value=”3″>3</option>
<option value=”4″>4</option>
<option value=”5″>5</option>
<option value=”6″>6</option>
<option value=”7″>7</option>
<option value=”8″>8</option>
</select></td>
<td style=”width: 101px” class=”style12″>
<input type=”text” name=”Subtotal” id=”totalcola” value=”0.00″ style=”width: 70px”/></td>
For your information, Total at the form are the Subtotal in the db. I want to create loop for the quantity and subtotal as the value insert are not correct. Tq. Really appreciate your help and guide. ?