forked from weezykon/cafe
-
Notifications
You must be signed in to change notification settings - Fork 0
/
order.php
21 lines (20 loc) · 788 Bytes
/
order.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?php include("header.inc.php"); ?>
<?php
$meal = $_GET['food'];
$query44 = "SELECT * FROM meals WHERE id = '$meal'";
$result44 = mysql_query($query44)
or die ("Couldn't execute query44.");
while ($row44 = mysql_fetch_array($result44,MYSQL_ASSOC))
{
$amount = $row44['price'];
$matric = $_SESSION['matric'];
$meal = $_GET['food'];
$category = $_GET['category'];
$query30 = "INSERT INTO cart (matric, meal, amount)
VALUES ('$matric', '$meal', '$amount')";
$result30 = mysql_query($query30) or die ("Couldn't execute query30");
// header("Location: meal.php?category=$category");
// redirect_to("meal.php?category=$category");
echo("<script>location.href = 'meal.php?category=$category';</script>");
}
?>