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!! Link to comment https://forums.phpfreaks.com/topic/213271-newbie-search-engine-with-dropdown-list/ 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. Link to comment https://forums.phpfreaks.com/topic/213271-newbie-search-engine-with-dropdown-list/#findComment-1110520 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.