+ 13
How to make an "add to basket" option on my website?
I want to add an option like "add to basket" on my website. It's a kind of mini game. The option I want to create will allow the user to add many items in a bag and submit. All his choices will be add in the database
5 Antworten
+ 4
Okay. Thanks :-)
+ 4
JavaScript array?
// in html call the function addtobasket(); onclick
var i=0;
var basket = new Array(50);
function addtobasket(){
basket[i]="WhatTheUserChose";
document.write(basket[i] + " was added");
i++ ;
}
+ 3
Thanks. It will be helpful
+ 2
you may use php sessions In this case
+ 1
or even better ,
in the items lists ..a button like add to basket ( add_item.php?id=1)
in the add items page/file an insert or update table into the database called baskets
with the user's id