Help me I want to select an option(Like Country INDIA) from dropdown menu and should be open State via AJAX after this i want to select State thn should be open Dist. List in dropdown menu via AJAX if you have any code please help me URGENTLY Thanks
you should make first dropdown with countries , then make a function with javascript/jqery , onchange(ajax) -> retrieves state list with selected country ,
make a page which will take a parameter ID , ( page?id=20 ) , and returns dropdown where id = 20
[php]
$sql = "select * from something where id = " . $_GET[‘id’];
$result = mysql_query($sql);
if(mysql_num_rows($result) < 0) {
echo “no states” ;
} else {
echo “”;
while($row = mysql_fetch_array($result)) {
echo “<option value=’” . $row[‘id’] . “’>” . $row[‘statename’] . “”;
}
echo “”;
[/php]
something like this …
cant edit a post ,
(mysql_num_rows($result) < 1 ) or (mysql_num_rows($result) == 0) but not (mysql_num_rows($result) < 0)