<?php

include 'connect.php';

$customer=$_GET['customer'];

$get=mysql_query("select * from customer where ID='$customer'");
$get1=mysql_fetch_array($get);

$vil=mysql_query("select * from villages where ID='$get1[village]'");
$vil1=mysql_fetch_array($vil);

echo'<div><div id="district">

<option value="" selected="selected">-- Select --</option>';

$sql=mysql_query("SELECT * from districts where state='32'") or die(mysql_error());
while($result=mysql_fetch_array($sql))
{

echo'<option value="'.$result['ID'].'">'.$result['district'].'</option>';

}

echo'</div><div id="taluk">

<option value="" selected="selected">-- Select --</option>';

$tlk=mysql_query("SELECT * from taluk where district='$get1[district]'") or die(mysql_error());
while($tlk1=mysql_fetch_array($tlk))
{

echo'<option value="'.$tlk1['ID'].'">'.$tlk1['taluk'].'</option>';

}

echo'</div><div id="village">

<option value="" selected="selected">-- Select --</option>';

$vil=mysql_query("SELECT * from villages where taluk='$get1[taluk]'") or die(mysql_error());
while($vil1=mysql_fetch_array($vil))
{

echo'<option value="'.$vil1['ID'].'">'.$vil1['village'].'</option>';

}

echo'</div></div>';

echo"<div id='doorno'>".$get1['doorno']."</div><div id='street'>".$get1['street']."</div><div id='dist'>".$get1['district']."</div><div id='talk'>".$get1['taluk']."</div><div id='vill'>".$get1['village']."</div><div id='mobile1'>".$get1['mobile1']."</div><div id='mobile2'>".$get1['mobile2']."</div>";

?>