Quantcast
Channel: CodeIgniter Forums - All Forums
Viewing all articles
Browse latest Browse all 14343

Selection of countries by select from the database

$
0
0
Hello.

I'm just starting to learn CodeIgniter.

I have a question.
The database created a table of countries and fields.

PHP Code:
CREATE TABLE IF NOT EXISTS `country` (
 
 `country_idint(11NOT NULL,
 
 `namevarchar(128NOT NULL,
 
 `iso_code_2varchar(2NOT NULL,
 
 `iso_code_3varchar(3NOT NULL,
 
 `address_formattext NOT NULL,
 
 `postcode_requiredtinyint(1NOT NULL,
 
 `statustinyint(1NOT NULL DEFAULT '1'
ENGINE=MyISAM AUTO_INCREMENT=258 DEFAULT CHARSET=utf8

At the moment I have on the page when registering the user, I need to write the country in the text field.

PHP Code:
<input class="form-control required" name="country" type="text" placeholder="<?php echo translate('country');?>" data-toggle="tooltip" title="<?php echo translate('country');?>"

I want the country instead of the field:

Select the select from the bats from the table country.
How to do it?

Help me please.

Viewing all articles
Browse latest Browse all 14343

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>