0

[SOLVED] Anyone can help me in php,html and mysql?

How can i delete all the item's from database of my shopping cart getting all the id store there using php and mysql? I clicked on one item its taking it's id and storing in cart with their name and price.How can i delete all item's when i click on buy in cart?the items will remove from database table permanently as it already bought

4th Apr 2020, 9:33 PM
Christina Jessy
Christina Jessy - avatar
11 Antworten
+ 4
What problem you are facing?
4th Apr 2020, 9:43 PM
A͢J
A͢J - avatar
+ 1
Hello Christina Jessy Please give more details about your problem so that we can help you.
4th Apr 2020, 9:45 PM
Denise Roßberg
Denise Roßberg - avatar
+ 1
Yes I am
12th Apr 2020, 8:03 PM
Muhammad Shahid
Muhammad Shahid - avatar
0
How can i delete all the item's from database of my shopping cart getting all the id store there using php and mysql? I clicked on one item its taking it's id and storing in cart with their name and price.How can i delete all item's when i click on buy in cart?the items will remove from database table permanently as it already bought
4th Apr 2020, 9:48 PM
Christina Jessy
Christina Jessy - avatar
4th Apr 2020, 9:53 PM
Denise Roßberg
Denise Roßberg - avatar
0
Denise Roßberg i can't get the ids from the cart.i want to get all the id of the items of the cart
4th Apr 2020, 9:56 PM
Christina Jessy
Christina Jessy - avatar
0
Christina Jessy, If I right understood your question, you need: 1) 4 tables: products, customers, cart_items, orders 2) As you said: "I clicked on one item its taking it's id and storing in cart with their name and price." - if you store item by name instead product id, it is a bad idea. Name and original price can retrieve from the products table using id 3) So, when customer presses "Add to cart" button, need to store new cart item, using customer_id and product_id (and additional data, if need, e.g. qty, options) 4) When customer enters the cart and presses "Place order", then you can add new order and simple delete all cart_items by customer_id
6th Apr 2020, 4:20 PM
Hello World
Hello World - avatar
0
Hello World Thank you for helping
6th Apr 2020, 4:23 PM
Christina Jessy
Christina Jessy - avatar
0
Hello World but i want that my items will delete too from database when i click checkout.for that i need multiple id.how can i get it?
12th Apr 2020, 3:24 AM
Christina Jessy
Christina Jessy - avatar
0
Christina, what items and table do you mean? N.4 of the previous answer describes how to remove multiple quote items.
12th Apr 2020, 3:50 PM
Hello World
Hello World - avatar