PHP Classes

Combo Box: Generate HTML form select inputs from MySQL data

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 40%Total: 4,015 All time: 781 This week: 57Up
Version License Categories
select 1.0.0Freely DistributableHTML, Databases
Description 

Author

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: Yugoslavia

  Files folder image Files (3)  
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

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:4,015
This week:0
All time:781
This week:57Up
User Ratings User Comments (2)
 All time
Utility:56%StarStarStar
Consistency:60%StarStarStarStar
Documentation:-
Examples:63%StarStarStarStar
Tests:-
Videos:-
Overall:40%StarStarStar
Rank:3809
 
Good approach.
16 years ago (Bill Norton)
70%StarStarStarStar
Thanks for building such an option.
17 years ago (zenis)
67%StarStarStarStar