DONE | urgent:i desperately need your help
Posted: Thu Sep 15, 2005 7:51 pm
hello there! i need assistance on this code problem of mine. this is for a school project and ive been trying to figure this out for days and i'm running out of time and options. well, here goes:
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
this is the part where user input is accepted, and once the user has clicked the button it will then update the text boxes on the right side of the screen based on the number of inputs by the user
lets say the user made another entry
and then once the user clicks on the [process order] button he will get redirected to a page that will show a summary of his transaction.
currently this is part of the code that i have for the interface:
you will notice that the form action redirects the user to "orderHandle.php". this is where i plan to handle the computations and stuff and then redirect the user to the interface again after performing the computations.
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!
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!