Hi all - can anybody give advice on the following problem?
The code below is for a country drop down list which puts the entry into a mysql database. It works fine but where the country chosen has two words, e.g. United States of America, the database table only receives the first word 'United'
I've looked everywhere for a solution but it's driving me mad! Any help gratefully received...
<?php ###########################drop down list#################################
$country = array(
1=>"----------------Select from list----------------",
2=>"United Kingdom",
3=>"'United States of America'",
4=>"Canada",
5=>"Germany",
6=>"France",
7=>"India",
8=>"Afghanistan",
9=>"Albania",
10=>"Algeria",
);
$country = str_replace(" ", " ", $country);
echo '<SELECT name=country>';
foreach ($country as $key => $value)
{
echo '<OPTION value='.$value.'> '.$value.'';
}
echo '</select>';
?>