Web Analytics Made Easy -
StatCounter Re: Listbox Lookup - CodingForum

Announcement

Collapse
No announcement yet.

Re: Listbox Lookup

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Re: Listbox Lookup

    Want the textbox to be populated with the selected records info when record is clicked in the listbox. I am restrieving the records from a mysql db. i would like a list of all records in the listbox and when the user clicks on a record the info is transfered to the textboxes for each field. These textboxes can be edited and then saved to update the info

  • #2
    The way I would do it is as follows:

    Query the database and get the records for the select box.
    Load up the page (create the select box, text boxes, etc..).
    The select box should have a methos such that onClick, the form is submitted. (ie. onClick="theForm.submit();").
    If the select box's variable isset(), then fill the text boxes appropriately.
    Additionally, there should be an update button, such that the info in the text boxes should be written in the database. This update button should be of type='submit'. There should be PHP code to test for this and run the updates also.

    That's the basic algorithm/solution. If you need more specifics, just ask.

    Hope that helps,
    Sadiq.

    Comment

    Working...
    X