Country Names PHP Class Country Names PHP Class
This a provide CountryNames class that you can easily get list of country names from provided mysql database table and also buildCountry Names PHP Class
This a provide CountryNames class that you can easily get list of country names from provided mys...Overview
Description
This a provide CountryNames class that you can easily get list of country names from provided mysql database table and also build up html select drop down box with country names.
Also this is bundled with simple html5 element creator that used to crate select drop down.
Fields in the database table are
iso2 , iso3, name_en , capital, currency_code, currency_name, telephone
Features
getCountries list
- getCoutriesSelectHtml drop down
-
in db table - iso2 , iso3, name_en , capital, currency_code, currency_name, telephone
Included
- CountryNames.class.php (for main class need to use)
- Html5.class.php (simple html5 builder)
- config.php (database configuration file)
- Db.class.php (pdo data access calss)
- index.php (example usage and instructions)
- install/ db_table_countries.sql (table create sql containing file)
- how_to_use.txt (Installation and setup instruction and helps)
Requirements
- php 5.30+
- mysql 5+
Instructions
How to setup or install
These are not much to install and configuration.
1)create table
First create a database if you don’t have a database for your application.
If you have database already recommend to use that database or still you can create new database.
Then find countries table using sql script provided in install/ db_table_countries.sql.
Execute db_table_countries.sql content to create countries table in database.
2) database configuration in config.php
Open up config.php and fill configuration viable with your database information.
Now we are ready to use CountryNames.
Demo
Load index.php to see sample demos and open idex.php and check how codes done.
How to use and further enhancement
Codes are well commented and you can modify as you wish and have fun.
Category | Scripts & Code / PHP Scripts / Miscellaneous |
First release | 5 October 2014 |
Last update | 5 October 2014 |