Jump to content

vk7

New Members
  • Content Count

    2
  • Joined

  • Last visited

Community Reputation

0 Neutral

About vk7

  • Rank
    Newbie
  1. The problems happens when the user is logged in. here i am posting code of check-if-added.php: <?php //This code checks if the product is added to cart. function check_if_added_to_cart($item_id) { $user_id = $_SESSION['user_id']; //We'll get the user_id from the session require("includes/common.php"); // We will select all the entries from the user_items table where the item_id is equal to the item_id we passed to this function, user_id is equal to the user_id in the session and status is 'Added to cart' $query = "SELECT * FROM users_items WHERE item_id='$item_id'
  2. I am working on ecommerce website. whenever i logged in to my website, In products.php page i gets an error (Undefined Index error: user_id) in adding item to a cart. and i gets that error in line 4 of 'check-if-added.php' files products.phpcheck-if-added.php
×
×
  • 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.