Hi!
Wondering if anyone can help/poing me in the direction of a suitable tutorial...
I'm just starting out with php and have a simple set of pages i need to add php to. I have a product page of three items,each item has its own form and submit button - the value of the submit is the name of the item - not the way i would have done it but these are the pages i have been given!
Basically, each button is an Add button that should add the item to a session and redirect the user to a cart page that summarises the items selected - i am able to add one item, but when i choose to go to another product page and add another item, this item writes over the first one so i only have the one item (last one added) in my cart!
I want to be able to add more than one item, more than once (page only allows one of the item to be added at a time - no way to edit the quantity - again, not my design or way of doing it...)
I understand i need to add the items to an array in my session - how would i do this? I am new to the array concept, go easy on me!
Also, on my cart page i want to be able to count how many of each item has been added - instead of listing each item seperatly, where one has been added 3 times, i want a count to show item = 3.
Please can someone help?!
Thanks so much for taking the time to read my ramblings!!
Wondering if anyone can help/poing me in the direction of a suitable tutorial...
I'm just starting out with php and have a simple set of pages i need to add php to. I have a product page of three items,each item has its own form and submit button - the value of the submit is the name of the item - not the way i would have done it but these are the pages i have been given!
Basically, each button is an Add button that should add the item to a session and redirect the user to a cart page that summarises the items selected - i am able to add one item, but when i choose to go to another product page and add another item, this item writes over the first one so i only have the one item (last one added) in my cart!
I want to be able to add more than one item, more than once (page only allows one of the item to be added at a time - no way to edit the quantity - again, not my design or way of doing it...)
I understand i need to add the items to an array in my session - how would i do this? I am new to the array concept, go easy on me!
Also, on my cart page i want to be able to count how many of each item has been added - instead of listing each item seperatly, where one has been added 3 times, i want a count to show item = 3.
Please can someone help?!
Thanks so much for taking the time to read my ramblings!!