Skeet Posted January 5, 2009 Share Posted January 5, 2009 Hello I'm have a small problem searching for this code and was wondering if someone around here can help me with it. Basically I'm making an application form and want to make a drop down box with a few country's in it, and when the select Canada it will give me a new box with all the provinces and another box for a postal code, Or if they were to select USA then it will give them the States and and place for XIP Code. Thanks in advance Link to comment https://forums.phpfreaks.com/topic/139499-need-help-with-a-small-php-code-please/ Share on other sites More sharing options...
vbnullchar Posted January 5, 2009 Share Posted January 5, 2009 check this http://www.bitrepository.com/web-programming/javascript/dynamic-dependent-dropdown-list-us-states-counties.html Link to comment https://forums.phpfreaks.com/topic/139499-need-help-with-a-small-php-code-please/#findComment-729768 Share on other sites More sharing options...
Skeet Posted January 5, 2009 Author Share Posted January 5, 2009 I should of showed my code I got now. I'm working with php-nuke and got all the country's I need in the db. but i sort of wanted to keep it in the same format. Is there any way to make it attach with this code? echo "<form action=\"modules.php?name=$module_name\" method=\"post\""; echo "name=\"contact_plus\">"; echo "<table border=\"0\" cellpadding=\"5\" cellspacing=\"0\" align=\"center\">"; echo "<tr><td align=\center\" valign=\"center\">"; echo "<font class=\"content\"><b>"._PLEASESELECT.":</b></font><br>"; echo "<select name=\"dpid\">"; $result = $db->sql_query("select did, country_name, staff_email from ".$prefix."_application order by country_name"); while (list($did, $country_name, $staff_email) = $db->sql_fetchrow($result)) { $did = intval($did); $country_name = stripslashes($country_name); $staff_email = stripslashes($staff_email); echo "<option value=\"$did\">$country_name"; } echo "</select></td></tr>"; Link to comment https://forums.phpfreaks.com/topic/139499-need-help-with-a-small-php-code-please/#findComment-729776 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.