PHP Classes

Combo Box: Generate HTML form select inputs from MySQL data

Recommend this page to a friend!
  Info   View files View files (3)   DownloadInstall with Composer Download .zip   Reputation   Support forum (2)   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 41%Total: 4,013 All time: 780 This week: 111Up
Version License Categories
select 1.0.0Freely DistributableHTML, Databases


This is a simple class for generating HTML form select inputs with options defined from data retrieved from a MySQL database table.

The class takes the name of the select input and the name of a MySQL table to query as required parameters.

The class generates a form select input using the value of the first column of the query result as input option value and the value of the second column as the option text.

Optionally, the class may also take as parameters:

- Name of the table field to sort the query
- Sorting ascending or descending criteria
- CSS class name to define the presentation details of the input field
- Value of the option to selected by default

Picture of Mumi Mania
Name: Mumi Mania <contact>
Classes: 1 package by
Country: ???
Age: 50
All time rank: 772
Week rank: 387 Up

  Files folder image Files  
File Role Description
Accessible without login Plain text file combo_box.conf.php Conf. config
Accessible without login Plain text file combo_box.example.php Example example
Plain text file combo_box.php Class class

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:780
This week:111Up
User Ratings User Comments (2)
 All time
Good approach.
15 years ago (Bill Norton)
Thanks for building such an option.
15 years ago (zenis)