Jump to content

need help with a small php code please


Skeet

Recommended Posts

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

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>";

 

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.