dumbgeek Posted September 13, 2010 Share Posted September 13, 2010 hi, im new to php and need some help with my project. i wanted to create a search form with dropdown list provided that the values in the dropdown list are the field names of the database that the form that call the search form. Ex. i have a A.php form that uses Table A from database X. then A.php press a button inside the form and then a search form will show. when i search for something in that table the dropdownlist will be populated by the field names of Table A. this same goes to B.php that uses Table B of database X.. and so on.. can anyone help me with this?? thanks!! Quote Link to comment Share on other sites More sharing options...
chintansshah Posted September 13, 2010 Share Posted September 13, 2010 To get the table column list use below query. $query = "DESC tablename"; After getting the result you can fill it using for or foreach loop. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.