Hi I am having this mysql table.
CREATE TABLE IF NOT EXISTS `selling_counties` (
`county_id` int(11) NOT NULL auto_increment,
`country` varchar(20) collate u
You need to select the values from your table
$mysqli = new mysqli($host, $user, $passwd, $database);
$result = $mysqli->query('select county_id, country, county_name from selling_counties');
$countries = array();
while ($row = $result->fetch_assoc()) {
$country = $row['country'];
if (!array_key_exists($country, $countries))
$countries[$country] = array();
$countries[$country][] = array($row['county_id'], $row['county']);
}
and put these in your html select.
Update to add county_id
in :