-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCart_data.php
More file actions
56 lines (39 loc) · 1.37 KB
/
Cart_data.php
File metadata and controls
56 lines (39 loc) · 1.37 KB
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php
session_start();
include("connection.php");
//
// $_SESSION['cart'][$id] = array("id"=>$id,"qty" =>$qty,"p_name"=>$name,"p_price"=>$price,"p_img"=>$p_img);
// echo " <script>window.location.assign('cart.php');</script> ";
// header("Location:cart.php");
// $products = array($name,$price,$quantity);
// $_SESSION[$cart] = $products;
// header('location:index.php');
$id = $_GET['id'];
$p_name = $_GET['p_name'];
$p_price = $_GET['p_price'];
$qty = $_GET['qty'];
// $query = "insert into order_info (p_id,p_name,p_price,p_qty)
// values
// ('$id','$p_name','$p_price','$qty');
// ";
// $result = mysqli_query($con,$query);
// if($result > 0)
// {
// header("Location:cart.php");
// }
// else
// {
// echo "<script>alert('data not Save!')</script>";
// }
// $_SESSION['cart'][$id] = array("id"=>$id,"qty" =>$qty,"p_name"=>$name,"p_price"=>$price,"p_img"=>$p_img);
// echo " <script>window.location.assign('cart.php');</script> ";
// header("Location:cart.php");
// $products = array($name,$price,$quantity);
// $_SESSION[$cart] = $products;
// header('location:index.php');
// $pid = $_GET['pid'];
// $qty = $_GET['qty'];
// $_SESSION['cart'] [$pid] = array("id"=>$pid,"qty"=>$qty);
// echo " <script>window.location.assign('add_cart.php');</script> ";
// header("Location:add_Cart.php");
?>