destiney20 Posted July 14, 2009 Share Posted July 14, 2009 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> <style type="text/css"> <!-- .style2 {font-size: 24px} .style3 { font-size: 36px; color: #330099; font-family: Chiller; } body { background-color: #FFE0C1; } .style11 {font-family: "Comic Sans MS"; font-weight: bold; color: #663399; } .style13 {font-family: "Comic Sans MS"} .style14 {font-family: "Comic Sans MS"; font-weight: bold; } --> </style> </head> <body> <form id="form1" name="form1" method="post" action="bill.php"> <div align="center" class="style2"> <h1 class="style3">AABC CANTEEN</h1> <table width="540" border="1" align="center"> <tr> <td width="60"><div align="justify" class="style11"> <div align="center">Code</div> </div></td> <td width="377"><div align="center" class="style11">MENU</div></td> <td width="81"><div align="center" class="style11">Price</div></td> </tr> <tr> <td><div align="center" class="style11">1</div></td> <td><div align="left" class="style11">MENUDO</div></td> <td><div align="center" class="style11">35</div></td> </tr> <tr> <td><div align="center" class="style11">2</div></td> <td><div align="left" class="style11">MECHADO</div></td> <td><div align="center" class="style11">40</div></td> </tr> <tr> <td><div align="center" class="style11">3</div></td> <td><div align="left" class="style11">FRIED CHICKEN </div></td> <td><div align="center" class="style11">25</div></td> </tr> <tr> <td><div align="center" class="style11">4</div></td> <td><div align="left" class="style11">CALDERETA</div></td> <td><div align="center" class="style11">50</div></td> </tr> <tr> <td><div align="center" class="style11">5</div></td> <td><div align="left" class="style11">MONGO</div></td> <td><div align="center" class="style11">15</div></td> </tr> </table> <table width="520" border="1"> <tr> <th colspan="4" scope="col"><div align="left" class="style11">DRINKS:</div></th> </tr> <tr> <td width="42"><span class="style11"> <label> <input name="size" type="radio" value="3" /> </label> </span></td> <td width="189"><span class="style11">SMALL</span></td> <td width="42"><span class="style11"> <label> <input name="drinks" type="radio" value="1" /> </label> </span></td> <td width="219"><span class="style11">COKE</span></td> </tr> <tr> <td><span class="style11"> <label> <input name="size" type="radio" value="6" /> </label> </span></td> <td><span class="style11">MEDIUM</span></td> <td><span class="style11"> <label> <input name="drinks" type="radio" value="2" /> </label> </span></td> <td><span class="style11">SPRITE</span></td> </tr> <tr> <td><span class="style11"> <label> <input name="size" type="radio" value="9" /> </label> </span></td> <td><span class="style11">LARGE</span></td> <td><span class="style11"> <label> <input name="drinks" type="radio" value="3" /> </label> </span></td> <td><span class="style11">M' DEW </span></td> </tr> </table> <br /> <p align="center" class="style11">RICE QUANTITY: <label> <input type="text" name="quantity" value=""/> </label> </p> <p align="center"><span class="style11">ENTER CODE:</span><span class="style14"> <label> </label> </span><span class="style13"><label> </label> </span> <label> <input type="text" name="code" value=""/> </label> </p> <p align="center"> <label> <input type="submit" name="Submit" value="Submit" /> </label> </p> </div> </form> </body> </html> <?php if(isset($_POST['sunmit'])){ $error .= "ulol mu"; if(empty($_POST['code'])){ $error .= "missing code"; }else $code = $_POST['code']; if(empty($_POST['quantity'])){ $error .= "missing quantity"; }else $quantity = $_POST['quatity']; if(isset($_POST['size'])){ $error .= "choose a size"; }else $size = $_POST['size']; if(isset($_POST['drinks'])){ $error .= "choose a drinks"; }else $drinks = $_POST['drinks']; if($code && $quantity && $size && $drinks){ switch ($code){ case 1:{ echo "Menudo Php. 35.00"; switch ($drinks){ case 1: { echo "coke"; switch ($size){ case 1:{ $drinks_price = 3 + 12; echo "Your drinks is " .$drinks_price; $rice_qty = $quantity * 10; echo "Your rice is " .$rice_qty; $bill = $rice_qty + $drink_price + 35; echo "Your Total bill is " .$bill; }break; case 2:{ $drinks_price = 6 + 12; echo "Your drinks is " .$drinks_price; $rice_qty = $quantity * 10; echo "Your rice is " .$rice_qty; $bill = $rice_qty + $drink_price + 35; echo "Your Total bill is " .$bill; }break; case 3:{ $drinks_price = 9 + 12; echo "Your drinks is " .$drinks_price; $rice_qty = $quantity * 10; echo "Your rice is " .$rice_qty; $bill = $rice_qty + $drink_price + 35; echo "Your Total bill is " .$bill; }break; case 2:{ echo "sprite"; switch ($size){ case 1:{ $drinks_price = 3 + 12; echo "Your drinks is " .$drinks_price; $rice_qty = $quantity * 10; echo "Your rice is " .$rice_qty; $bill = $rice_qty + $drink_price + 35; echo "Your Total bill is " .$bill; }break; case 2:{ $drinks_price = 6 + 12; echo "Your drinks is " .$drinks_price; $rice_qty = $quantity * 10; echo "Your rice is " .$rice_qty; $bill = $rice_qty + $drink_price + 35; echo "Your Total bill is " .$bill; }break; case 3:{ $drinks_price = 9 + 12; echo "Your drinks is " .$drinks_price; $rice_qty = $quantity * 10; echo "Your rice is " .$rice_qty; $bill = $rice_qty + $drink_price + 35; echo "Your Total bill is " .$bill; }break; case 2:{ echo "m' dew"; switch ($size){ case 1:{ $drinks_price = 3 + 12; echo "Your drinks is " .$drinks_price; $rice_qty = $quantity * 10; echo "Your rice is " .$rice_qty; $bill = $rice_qty + $drink_price + 35; echo "Your Total bill is " .$bill; }break; case 2:{ $drinks_price = 6 + 12; echo "Your drinks is " .$drinks_price; $rice_qty = $quantity * 10; echo "Your rice is " .$rice_qty; $bill = $rice_qty + $drink_price + 35; echo "Your Total bill is " .$bill; }break; case 3:{ $drinks_price = 9 + 12; echo "Your drinks is " .$drinks_price; $rice_qty = $quantity * 10; echo "Your rice is " .$rice_qty; $bill = $rice_qty + $drink_price + 35; echo "Your Total bill is " .$bill; }break; case 2:{ echo "Mechado Php. 40.00"; switch ($drinks){ case 1: { echo "coke"; switch ($size){ case 1:{ $drinks_price = 3 + 12; echo "Your drinks is " .$drinks_price; $rice_qty = $quantity * 10; echo "Your rice is " .$rice_qty; $bill = $rice_qty + $drink_price + 35; echo "Your Total bill is " .$bill; }break; case 2:{ $drinks_price = 6 + 12; echo "Your drinks is " .$drinks_price; $rice_qty = $quantity * 10; echo "Your rice is " .$rice_qty; $bill = $rice_qty + $drink_price + 35; echo "Your Total bill is " .$bill; }break; case 3:{ $drinks_price = 9 + 12; echo "Your drinks is " .$drinks_price; $rice_qty = $quantity * 10; echo "Your rice is " .$rice_qty; $bill = $rice_qty + $drink_price + 35; echo "Your Total bill is " .$bill; }break; case 2:{ echo "sprite"; switch ($size){ case 1:{ $drinks_price = 3 + 12; echo "Your drinks is " .$drinks_price; $rice_qty = $quantity * 10; echo "Your rice is " .$rice_qty; $bill = $rice_qty + $drink_price + 35; echo "Your Total bill is " .$bill; }break; case 2:{ $drinks_price = 6 + 12; echo "Your drinks is " .$drinks_price; $rice_qty = $quantity * 10; echo "Your rice is " .$rice_qty; $bill = $rice_qty + $drink_price + 35; echo "Your Total bill is " .$bill; }break; case 3:{ $drinks_price = 9 + 12; echo "Your drinks is " .$drinks_price; $rice_qty = $quantity * 10; echo "Your rice is " .$rice_qty; $bill = $rice_qty + $drink_price + 35; echo "Your Total bill is " .$bill; }break; case 2:{ echo "m' dew"; switch ($size){ case 1:{ $drinks_price = 3 + 12; echo "Your drinks is " .$drinks_price; $rice_qty = $quantity * 10; echo "Your rice is " .$rice_qty; $bill = $rice_qty + $drink_price + 35; echo "Your Total bill is " .$bill; }break; case 2:{ $drinks_price = 6 + 12; echo "Your drinks is " .$drinks_price; $rice_qty = $quantity * 10; echo "Your rice is " .$rice_qty; $bill = $rice_qty + $drink_price + 35; echo "Your Total bill is " .$bill; }break; case 3:{ $drinks_price = 9 + 12; echo "Your drinks is " .$drinks_price; $rice_qty = $quantity * 10; echo "Your rice is " .$rice_qty; $bill = $rice_qty + $drink_price + 35; echo "Your Total bill is " .$bill; }break; case 3:{ echo "fried chiken Php. 25.00"; switch ($drinks){ case 1: { echo "coke"; switch ($size){ case 1:{ $drinks_price = 3 + 12; echo "Your drinks is " .$drinks_price; $rice_qty = $quantity * 10; echo "Your rice is " .$rice_qty; $bill = $rice_qty + $drink_price + 35; echo "Your Total bill is " .$bill; }break; case 2:{ $drinks_price = 6 + 12; echo "Your drinks is " .$drinks_price; $rice_qty = $quantity * 10; echo "Your rice is " .$rice_qty; $bill = $rice_qty + $drink_price + 35; echo "Your Total bill is " .$bill; }break; case 3:{ $drinks_price = 9 + 12; echo "Your drinks is " .$drinks_price; $rice_qty = $quantity * 10; echo "Your rice is " .$rice_qty; $bill = $rice_qty + $drink_price + 35; echo "Your Total bill is " .$bill; }break; case 2:{ echo "sprite"; switch ($size){ case 1:{ $drinks_price = 3 + 12; echo "Your drinks is " .$drinks_price; $rice_qty = $quantity * 10; echo "Your rice is " .$rice_qty; $bill = $rice_qty + $drink_price + 35; echo "Your Total bill is " .$bill; }break; case 2:{ $drinks_price = 6 + 12; echo "Your drinks is " .$drinks_price; $rice_qty = $quantity * 10; echo "Your rice is " .$rice_qty; $bill = $rice_qty + $drink_price + 35; echo "Your Total bill is " .$bill; }break; case 3:{ $drinks_price = 9 + 12; echo "Your drinks is " .$drinks_price; $rice_qty = $quantity * 10; echo "Your rice is " .$rice_qty; $bill = $rice_qty + $drink_price + 35; echo "Your Total bill is " .$bill; }break; case 2:{ echo "m' dew"; switch ($size){ case 1:{ $drinks_price = 3 + 12; echo "Your drinks is " .$drinks_price; $rice_qty = $quantity * 10; echo "Your rice is " .$rice_qty; $bill = $rice_qty + $drink_price + 35; echo "Your Total bill is " .$bill; }break; case 2:{ $drinks_price = 6 + 12; echo "Your drinks is " .$drinks_price; $rice_qty = $quantity * 10; echo "Your rice is " .$rice_qty; $bill = $rice_qty + $drink_price + 35; echo "Your Total bill is " .$bill; }break; case 3:{ $drinks_price = 9 + 12; echo "Your drinks is " .$drinks_price; $rice_qty = $quantity * 10; echo "Your rice is " .$rice_qty; $bill = $rice_qty + $drink_price + 35; echo "Your Total bill is " .$bill; }break; break; case 4:{ echo "caldereta Php. 50.00"; switch ($drinks){ case 1: { echo "coke"; switch ($size){ case 1:{ $drinks_price = 3 + 12; echo "Your drinks is " .$drinks_price; $rice_qty = $quantity * 10; echo "Your rice is " .$rice_qty; $bill = $rice_qty + $drink_price + 35; echo "Your Total bill is " .$bill; }break; case 2:{ $drinks_price = 6 + 12; echo "Your drinks is " .$drinks_price; $rice_qty = $quantity * 10; echo "Your rice is " .$rice_qty; $bill = $rice_qty + $drink_price + 35; echo "Your Total bill is " .$bill; }break; case 3:{ $drinks_price = 9 + 12; echo "Your drinks is " .$drinks_price; $rice_qty = $quantity * 10; echo "Your rice is " .$rice_qty; $bill = $rice_qty + $drink_price + 35; echo "Your Total bill is " .$bill; }break; case 2:{ echo "sprite"; switch ($size){ case 1:{ $drinks_price = 3 + 12; echo "Your drinks is " .$drinks_price; $rice_qty = $quantity * 10; echo "Your rice is " .$rice_qty; $bill = $rice_qty + $drink_price + 35; echo "Your Total bill is " .$bill; }break; case 2:{ $drinks_price = 6 + 12; echo "Your drinks is " .$drinks_price; $rice_qty = $quantity * 10; echo "Your rice is " .$rice_qty; $bill = $rice_qty + $drink_price + 35; echo "Your Total bill is " .$bill; }break; case 3:{ $drinks_price = 9 + 12; echo "Your drinks is " .$drinks_price; $rice_qty = $quantity * 10; echo "Your rice is " .$rice_qty; $bill = $rice_qty + $drink_price + 35; echo "Your Total bill is " .$bill; }break; case 2:{ echo "m' dew"; switch ($size){ case 1:{ $drinks_price = 3 + 12; echo "Your drinks is " .$drinks_price; $rice_qty = $quantity * 10; echo "Your rice is " .$rice_qty; $bill = $rice_qty + $drink_price + 35; echo "Your Total bill is " .$bill; }break; case 2:{ $drinks_price = 6 + 12; echo "Your drinks is " .$drinks_price; $rice_qty = $quantity * 10; echo "Your rice is " .$rice_qty; $bill = $rice_qty + $drink_price + 35; echo "Your Total bill is " .$bill; }break; case 3:{ $drinks_price = 9 + 12; echo "Your drinks is " .$drinks_price; $rice_qty = $quantity * 10; echo "Your rice is " .$rice_qty; $bill = $rice_qty + $drink_price + 35; echo "Your Total bill is " .$bill; break; case 5:{ echo "Mongo Php. 15.00"; switch ($drinks){ case 1: { echo "coke"; switch ($size){ case 1:{ $drinks_price = 3 + 12; echo "Your drinks is " .$drinks_price; $rice_qty = $quantity * 10; echo "Your rice is " .$rice_qty; $bill = $rice_qty + $drink_price + 35; echo "Your Total bill is " .$bill; }break; case 2:{ $drinks_price = 6 + 12; echo "Your drinks is " .$drinks_price; $rice_qty = $quantity * 10; echo "Your rice is " .$rice_qty; $bill = $rice_qty + $drink_price + 35; echo "Your Total bill is " .$bill; }break; case 3:{ $drinks_price = 9 + 12; echo "Your drinks is " .$drinks_price; $rice_qty = $quantity * 10; echo "Your rice is " .$rice_qty; $bill = $rice_qty + $drink_price + 35; echo "Your Total bill is " .$bill; }break; case 2:{ echo "sprite"; switch ($size){ case 1:{ $drinks_price = 3 + 12; echo "Your drinks is " .$drinks_price; $rice_qty = $quantity * 10; echo "Your rice is " .$rice_qty; $bill = $rice_qty + $drink_price + 35; echo "Your Total bill is " .$bill; }break; case 2:{ $drinks_price = 6 + 12; echo "Your drinks is " .$drinks_price; $rice_qty = $quantity * 10; echo "Your rice is " .$rice_qty; $bill = $rice_qty + $drink_price + 35; echo "Your Total bill is " .$bill; }break; case 3:{ $drinks_price = 9 + 12; echo "Your drinks is " .$drinks_price; $rice_qty = $quantity * 10; echo "Your rice is " .$rice_qty; $bill = $rice_qty + $drink_price + 35; echo "Your Total bill is " .$bill; }break; case 2:{ echo "m' dew"; switch ($size){ case 1:{ $drinks_price = 3 + 12; echo "Your drinks is " .$drinks_price; $rice_qty = $quantity * 10; echo "Your rice is " .$rice_qty; $bill = $rice_qty + $drink_price + 35; echo "Your Total bill is " .$bill; }break; case 2:{ $drinks_price = 6 + 12; echo "Your drinks is " .$drinks_price; $rice_qty = $quantity * 10; echo "Your rice is " .$rice_qty; $bill = $rice_qty + $drink_price + 35; echo "Your Total bill is " .$bill; }break; case 3:{ $drinks_price = 9 + 12; echo "Your drinks is " .$drinks_price; $rice_qty = $quantity * 10; echo "Your rice is " .$rice_qty; $bill = $rice_qty + $drink_price + 35; echo "Your Total bill is " .$bill; }break; default: echo "code not Found"; } ?> PLEASE HELP ME TO FIX THIS ASAP Link to comment https://forums.phpfreaks.com/topic/165901-guys-help-me-about-this-canteen-project-this-thing-drive-me-crazy/ Share on other sites More sharing options...
trq Posted July 14, 2009 Share Posted July 14, 2009 You have to to be kidding right? Link to comment https://forums.phpfreaks.com/topic/165901-guys-help-me-about-this-canteen-project-this-thing-drive-me-crazy/#findComment-875052 Share on other sites More sharing options...
Maq Posted July 14, 2009 Share Posted July 14, 2009 I'm almost done destiney, hold on just one sec. Link to comment https://forums.phpfreaks.com/topic/165901-guys-help-me-about-this-canteen-project-this-thing-drive-me-crazy/#findComment-875126 Share on other sites More sharing options...
phporcaffeine Posted July 14, 2009 Share Posted July 14, 2009 WTF Link to comment https://forums.phpfreaks.com/topic/165901-guys-help-me-about-this-canteen-project-this-thing-drive-me-crazy/#findComment-875127 Share on other sites More sharing options...
nbarone Posted July 14, 2009 Share Posted July 14, 2009 mmm rice Link to comment https://forums.phpfreaks.com/topic/165901-guys-help-me-about-this-canteen-project-this-thing-drive-me-crazy/#findComment-875130 Share on other sites More sharing options...
xcoderx Posted July 14, 2009 Share Posted July 14, 2009 Pmpl, rofl wtf ??? Is this. Link to comment https://forums.phpfreaks.com/topic/165901-guys-help-me-about-this-canteen-project-this-thing-drive-me-crazy/#findComment-875144 Share on other sites More sharing options...
nbarone Posted July 14, 2009 Share Posted July 14, 2009 Pmpl, rofl wtf ??? Is this. dreamweaver meets syntax errors. Link to comment https://forums.phpfreaks.com/topic/165901-guys-help-me-about-this-canteen-project-this-thing-drive-me-crazy/#findComment-875145 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.