first you might want to see the interface so as you'll have clue as to what im talking about

as you will see on the interface on left side of the screen there are text boxes with buttons right next to it
Code: Select all
meal : [textbox for quantity][textbox for amount] [button]Code: Select all
user input (left side)
meal : [4 ][30 ] [ME]
*once the user pushes the [ME] button...
output (right side)
meal : [4 ][ 120] = [120]Code: Select all
user input (left side)
meal : [2 ][15 ] [ME]
*once the user pushes the [ME] button the program will just continue computing from the last entry...
output (right side)
meal : [6 ][ 150] = [150]currently this is part of the code that i have for the interface:
Code: Select all
print '<td height="184" colspan="3" width="463">' ;
print '<form method = "POST" action="orderHandle.php"> ' ;
print '<table border="2" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1">' ;
print '<tr>' ;
print '<td width="100%">' ;
print '<table border="2" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1">' ;
print '<tr>' ;
//this is where the amount and quantity input is entered
print '<td width="47%" rowspan="2">' ;
print ' <b><font face="Tahoma" size="2" color="#333300">meal :</font></b> <input type="text" name="meQTYa" size="2"><input type="text" name="meAMTa" size="3"><input type="submit" value="ME" name="button">' ;
print '<p> <b><font face="Tahoma" size="2" color="#333300">snack :</font></b> <input type="text" name="snQTYa" size="2"><input type="text" name="snAMTa" size="3"><input type="submit" value="SN" name="button"></p>' ;
print '<p> <b><font face="Tahoma" size="2" color="#333300">dessert :</font></b> <input type="text" name="deQTYa" size="2"><input type="text" name="deAMTa" size="3"><input type="submit" value="DE" name="button"></p>' ;
print '<p> <b><font face="Tahoma" size="2" color="#333300">beverage:</font></b> <input type="text" name="beQTYa" size="2"><input type="text" name="beAMTa" size="3"><input type="submit" value="BE" name="button"></td>' ;
//this is where the total amount and quantity is actively being updated depending on the number of inputs
print '<td width="53%">' ;
print ' <b><font face="Tahoma" size="2" color="#333300">meal : </font></b><input type="text" name="meQTYb" size="3"><input type="text" name="meAMTb" size="3"><b><font face="Tahoma" size="2" color="#333300">=</font></b><input type="text" name="meTOTAL" size="3">' ;
print '<p> <b><font face="Tahoma" size="2" color="#333300">snack : </font></b> <input type="text" name="snQTYb" size="3"><input type="text" name="snAMTb" size="3"><b><font face="Tahoma" size="2" color="#333300">=</font></b><input type="text" name="snTOTAL" size="3"></p>' ;
print '<p> <b><font face="Tahoma" size="2" color="#333300">dessert : </font></b><input type="text" name="deQTYb" size="3"><input type="text" name="deAMTb" size="3"><b><font face="Tahoma" size="2" color="#333300">=</font></b><input type="text" name="deTOTAL" size="3"></p>' ;
print '<p> <b><font face="Tahoma" size="2" color="#333300">beverage :</font></b> <input type="text" name="beQTYb" size="3"><input type="text" name="beAMTb" size="3"><b><font face="Tahoma" size="2" color="#333300">=</font></b><input type="text" name="beTOTAL" size="3"></p></td>' ;
print '</tr>' ;
print '<tr>' ;
print '<td width="53%"> <b><font face="Tahoma" size="2" color="#333300">total :</font></b> <input type="text" name="pTOTAL" size="6"></td>' ;
print '</tr>' ;
print '</table>' ;
print '</td>' ;
print '</tr>' ;
print '<tr>' ;
print '<td width="100%" bgcolor = "#FF5B33">' ;
print '<input type="submit" value="process order" name="button" style="float: right"><input type="reset" value="clear" name="B6" style="float: right"></td>' ;
print '</tr>' ;
print '</table>' ;
print '</form>' ;
print '</td>' ;
print '</tr>' ;i have no clue on how to go about this at the moment. if you have better ideas or suggestions please help me out. thank you!