how to create an auto update drop downlist in php

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bikashliju
    New Member
    • Sep 2010
    • 9

    how to create an auto update drop downlist in php

    hi,

    i am facing a problem while practicing php.

    i am working a demo hr management system ....if a new record is added to database then the drop down list to
    show employee id will be updated immediately with that id
    how to create a dynamic dropdown list for this

    thanx in advance
  • dlite922
    Recognized Expert Top Contributor
    • Dec 2007
    • 1586

    #2
    Well, first you pull the data from the database. Then loop through it and create the <option> tag fro the <select> field.

    Of course the page needs to be refreshed for this to happen since the web is stateless (there's no live connection to the server)

    If you don't know how to connect to a database and pull data, I suggest you find some tutorial and teach yourself.

    Best way to practice PHP is to ....practice coding PHP, right?


    Dan

    Comment

    • oranoos3000
      New Member
      • Jan 2009
      • 107

      #3
      php is server side scripting language and is not a live script language

      hi
      your meaning from this question is not clear
      but if your meaning is as below
      but add new user or update information an user options in the select element is changed it's correct think because php is server side only and you cant identify this item

      Comment

      Working...