I have a login page which creates $_SESSION['username']= $username and $_SESSION['id'] = $id
now I have a shopping cart and I want to get that id so I can get the rest of the user's information
i tried $_SESSION['order'] = $_SESSION[id']; but it doesn't work. I'm still learning PHP and I don't know how to get these data from that session.
<?php
include 'dbConfig.php';
include 'Cart.php';
$cart = new Cart;
if($cart->total_items() <= 0){
header("Location: ");
}
$_SESSION['order'] = $_SESSION[id'];
$query = $db->query("SELECT * FROM members WHERE id = ".$_SESSION['id']);
$custRow = $query->fetch_assoc();
?>