Results 1 to 2 of 2

Thread: fetching data in db on combobox

  1. #1
    Join Date
    Jun 2010
    Posts
    11
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default fetching data in db on combobox

    i am using following chained combo (like you know its values coming from js file)
    http://www.dynamicdrive.com/dynamici...ects/index.htm

    i am using this combo for my form. i can insert its value into mysql but when i edit any record

    how can i select outomatically entry which is coming from db ?

  2. #2
    Join Date
    Jul 2010
    Location
    Minnesota
    Posts
    256
    Thanks
    1
    Thanked 21 Times in 21 Posts

    Default

    Combining the JS script with a db select is rather complicated. It's really better to just use a little jquery and a db that holds all of you selections. Actually I have a tutorial on this - http://phpacademy.org/forum/viewtopic.php?f=31&t=9840 Now in the tutorial I don't get into the concept of retaining the selection after a form post but I have done it on a couple of my sites. I don't really like to just give away code cause learning it is a better idea, but if you get stuck and can't figure out things you can post back or pm me and I will help where I can.

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
  •