Forum Moderators: coopster
A script allows members to select only one “country” from drop down box. Here countries are as array (wcr):
[2][b]<select name="country" class="input">
<? $p=0;asort($wcr);reset($wcr);
while (list ($p, $val) = each ($wcr)) {
echo '<option value="'.$p.'">'.$val;
}
?>
</select>mysql_query("INSERT INTO ".C_MYSQL_MEMBERS." VALUES (".$country.")[/2][/b]
It sends data to file memberview.php and here is code:
[2][b]<?if(!empty($i['country'])) {?>
wcr[$i['country']];?>[/2][/b]
I’m newbe in php, please suggest anyone how to change this, that member can choose multiple countries from drop down box? Maybe need some changes also in Mysql tables?
[2][b]
$sql = "CREATE TABLE ".C_MYSQL_MEMBERS." (
country tinyint unsigned NOT NULL default '0',
)";
mysql_query($sql);[/2][/b]