adding a add and remove function for a product category.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
omegaultimo2
Forum Newbie
Posts: 1
Joined: Thu Jan 26, 2012 12:47 pm

adding a add and remove function for a product category.

Post by omegaultimo2 »

Hey guys.
Right ill try explain as best i can.
Basicly we were told to write a php script that can view a shopping cart.

The web application should allow the user to view the items in a catalogue, add items to a shopping cart, remove items from the shopping cart, and to view the contents of the shopping cart.

The items in the catalogue should be stored as an array of objects. (The next assignment will require you to store this list of objects in a database). There should also be pages to allow the user to add, edit and delete items in the catalogue.

Thats taken from a brief.Ive spent the most of the week getting it to view a catalog and now it can add items.view the cart its added them to and remove them from the cart and return.
What im having trouble with is making the add function for the the other users or admin* to add/edit/delete.i reckoned adding and deleting wouldnt be so bad considering ive alrready done so.But im kinda stumped on how to do it.i think what the brief wanted was a seprate product add that would actully let u add another product to the cart list on the same page and then u can add that to the shopping basket etc.

Yea real stumped.if only it was through sql it would be so much handier.
ill post the code below.if anyone can help at all in the slightest id be so grateful.Thank you.
CarProject2.zip
Car Project2
(3.94 KiB) Downloaded 62 times
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: adding a add and remove function for a product category.

Post by Christopher »

Can you post the pertinent section in your post -- rather than a download. It will make it easier for people to answer if you can focus on the specific part of the code that is not working.
(#10850)
Post Reply