Heres my code for the drop downs:
Code: Select all
<strong>Country:</strong>
<select name="country" id="country" class="textbox">
<?php
$country = $db->select("SELECT * FROM cc_iso_countries");
for($i=0;$i<count($country); $i++){ ?>
<option id="<?php echo $country[$i]['numcode']; ?>" value="<?php echo $country[$i]['id']; ?>"><?php echo $country[$i]['printable_name']; ?></option>
<?php } ?>
</select>
<select name="state" id="state" class="textbox">
<?php
$country = $db->select("SELECT * FROM cc_iso_counties WHERE");
for($i=0;$i<count($country); $i++){ ?>
<option id="<?php echo $country[$i]['numcode']; ?>" value="<?php echo $country[$i]['id']; ?>"><?php echo $country[$i]['printable_name']; ?></option>
<?php } ?>
</select>
--------------------------------------------------------------------
iso_countries iso_counties
id-------------------------+ id
iso +-----------country_id
printable_name abbrev
iso3 name
numcode
and the url for the javascript code i was trying to use is here
http://www.dynamicdrive.com/dynamicinde ... /index.htm