Adding a value to a field in PHP and mysql(shopping cart ex)

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
shab620
Forum Commoner
Posts: 48
Joined: Tue Jan 18, 2005 7:50 pm

Adding a value to a field in PHP and mysql(shopping cart ex)

Post by shab620 »

Hye
I'm attemting to create a sort of a shopping cart system for a restaurant where by users can add items and purchase and these item is then displayed in a history(Account info)
My question is how would i add a value to a field which i select from say a check box list. I've can retrive the value of the check box but how do i add a price to that value when i insert the values into the table at the mysql end?

Hope somebody can help?????
:D :D
Regards,
Shab
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

My question is how would i add a value to a field which i select from say a check box list. I've can retrive the value of the check box but how do i add a price to that value when i insert the values into the table at the mysql end?
Do you have the price values stored anywhere (in a db table, array, etc)? This shouldn't be anything more than fetching a price for an item id and entering that info upon insert.

This is of course if I understand your request.
Post Reply