Location: PHPKode > projects > NCD Toolkit > ncdtoolkit1.2/ncd/countries.inc.php
<?php
	$query_country = "SELECT PrintableName, ISO3 FROM Countries WHERE ISO3 != '' ORDER BY LOWER(Name)";
	$result_country = mysql_query($query_country);

	$country_popup = "<select name=\"country_id\"><option value=\"\">Select country...</option>\n";
	while ($row_country = mysql_fetch_array($result_country))
	{	
		$popup_country_id = $row_country[1];
		$popup_country_name = $row_country[0];
		
		if ($country_id == $popup_country_id)
			$selected = "selected";
		else
			$selected = "";
		
		$country_popup .= "<option value=\"$popup_country_id\" $selected>$popup_country_name</option>\n";
	}
	$country_popup .= "</select>";
?>
Return current item: NCD Toolkit