Hi all,
Please find the following code.
<html>
<HEAD>
<TITLE> Country Listing </TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?php include 'connection.php'; ?>
<form name="call_country" action="POST">
<table>
<tr>
<td>
<?php
$qry = "SELECT country_id, country_name from country_m where country_id != '$pass_country_id' ";
$res = mysql_query($qry);
?>
<select name='priority' onChange="window.document.location='show_state.php?priority='+this.options[this.selectedIndex].value;">
<?php
while ($row = mysql_fetch_array($res))
{
echo "<option value=\"$row[country_id]\">$row[country_name]</option>";
}
echo "</select> "; ?>
</td>
</tr>
</table>
</form>
</body>
</html>
On a form I am displaying the country name and the corresponding states / counties / province of that country. At the the top I am showing the drop down list of countries ( containing countries other than the current country).
When the user selects country, I want to show the states / counties / province of newly selected country.
show_state.php is the another form, but in the above code, the country code does not get pass with the call to form.
What should I do to overcome this problem?