Jump to content

GUYS HELP ME ABOUT THIS CANTEEN PROJECT THIS THING DRIVE ME CRAZY


destiney20

Recommended Posts

<!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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.