Results 1 to 3 of 3

Thread: Shopping List Help

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Mar 2007
    Posts
    183

    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.

  2. #2
    Hyperactive Member
    Join Date
    Dec 2006
    Location
    Ubuntu Haters Club
    Posts
    405

    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.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Mar 2007
    Posts
    183

    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
  •  



Click Here to Expand Forum to Full Width