forked from shivang0203/DBMS-Project1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
order.php
26 lines (23 loc) · 784 Bytes
/
order.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?php include('partials_front/menu.php'); ?>
<?php
if (isset($_POST['food_id'])) {
$food_id = $_POST['food_id'];
$sql1 = "INSERT INTO `temp` (`food_id`) VALUES ($food_id)";
$res2 = mysqli_query($conn, $sql1);
header('location:'.SITEURL.'foods.php');
// $sql = "SELECT * FROM `table_food` WHERE `table_food`.`id`='$food_id'";
// $res = mysqli_query($conn, $sql);
// $count = mysqli_num_rows($res);
// if ($count == 1) {
// $row = mysqli_fetch_assoc($res);
// $title = $row['title'];
// $price = $row['price'];
// $description = $row['description'];
// $image_name = $row['image_name'];
// } else {
// header('location:'.SITEURL);
// }
} else {
header('location:'.SITEURL.'foods.php');
}
?>