SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Dec 2012
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Dynamic Dropdown list from MySQL Table

    I have a table named "Inventory"
    It has a table named "StockMaster"
    StockMaster has two columns : "StockID" and "StockItem" ("StockItem" has name of the Stock item)

    I want to create a Form with a few input fields for date, quantity of the stock item, Inward/Outward etc, and also having a field with the StockItems from the StockMaster table.
    Although the Form is populated with the StockItem (Item name), on form submission the corresponding StockIds should get sent to the script that is processing the submitted data.

    I tried a couple of scripts without luck. Please help.

    Thanks in advance,

    Regards,
    Rajendra

  2. #2
    SitePoint Member
    Join Date
    Dec 2012
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In the previous post, please read "Inventory" as the database name and not Table name.

  3. #3
    Keeper of the SFL StarLion's Avatar
    Join Date
    Feb 2006
    Location
    Atlanta, GA, USA
    Posts
    3,748
    Mentioned
    69 Post(s)
    Tagged
    0 Thread(s)
    So... give your <option> tags the value of the stockID's, but put the names in the display.
    Never grow up. The instant you do, you lose all ability to imagine great things, for fear of reality crashing in.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •