|
-
Jul 16th, 2007, 04:08 PM
#1
Thread Starter
Addicted Member
Shopping List Help
Hi,
I am working on a Web site that tells you how to build electrical devices. Every page telling the user how to build an electrical device has a categorized list of things to add to the shopping list. I want to have checkboxes next to the categorized items. My problem is I don't know how I can add the quantities to a MySQL database (I set the quantity field to NOT NULL).
Thanks,
moonman239
BTW: If you are guessing I am using PHP, you're right.
Last edited by moonman239; Jul 16th, 2007 at 06:23 PM.
-
Jul 17th, 2007, 07:05 AM
#2
Hyperactive Member
Re: Shopping List Help
Ummm,
Code:
UPDATE `table` SET `quantity` = '$quantityVar' WHERE `item_id` = '$itemID' LIMIT 1;
?
EDIT: Please (next time, this time even!) give us some context to work in. ie. surrounding code around where you want to update the field
» Twitter: @rudi_visser : Website: www.rudiv.se «
If Apple fixes security flaws, they are heralded as proactive. If Microsoft fixes a security flaw, they finally got around to fixing their buggy OS.
-
Jul 24th, 2007, 07:27 PM
#3
Thread Starter
Addicted Member
Re: Shopping List Help
Well I want PHP to generate the shopping list when the browser requests a page telling the user how to build the machine. Is there any way I can do it while only typing whatever's needed once?
BTW: Thanks for your generous help as far as the quantity is concerned. I will just be sure the PHP page involved enters the quantity. I am not going to reveal the code for the page that tells the user how to build the machine because I don't want THAT page to add to the list, I want the page that lists the tutorials on building machines to add to the list.
Unless, of course, it's the only way possible.
Last edited by penagate; Jul 24th, 2007 at 08:03 PM.
Reason: merged
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|