please a readCreate database and create tables same country, land and place. First plateau land needs digit fields same land id and land name. Country id’s concept should ordered as machine process and attain it as direct key. Second plateau land needs threesome fields same land id, land id, and land name.  Here land id should be direct key and ordered it as machine increment. Third plateau regularise requirement quaternary fields same land id, land id, dist id and dist name. Here dist id should direct key and ordered it as machine increment.1.Country       Select Country    <?php   $res = mysql_query("select * from cnt");   while($row = mysql_fetch_array($res))   {   echo " ".$row['cname']." ";   }   ?>    State     Select Country First         City     Select State First   2.db.php<?php//////////// Change the accumulation conception exclusive with your database login info /////////////////$dbservertype='mysql';// hostname or ip of server$servername='localhost';// username and password to index onto db server$dbusername='root';$dbpassword='';$dbname='list1';///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// DONOT EDIT BELOW  ////////////////////////////////////////////////connecttodb($servername,$dbname,$dbusername,$dbpassword);function connecttodb($servername,$dbname,$dbuser,$dbpassword){global $link;$link=mysql_connect ("$servername","$dbuser","$dbpassword");if(!$link){die("Could not enter to MySQL");}mysql_select_db("$dbname",$link) or expire ("could not unstoppered db".mysql_error());}?>3. findstate.php<? $country=intval($_GET['country']);include("db.php");$query="SELECT * FROM stat WHERE cid='$country'";$result=mysql_query($query);?>,this.value)">  Select State   <? while($row=mysql_fetch_array($result)) { ?>    ><?=$row['st']?>   <? } ?>4.findcity.php<?php $countryId=intval($_GET['country']);$stateId=intval($_GET['state']);include ("db.php");$query="SELECT * FROM dist WHERE cid='$countryId' AND sid='$stateId'";$result=mysql_query($query);?>  Select City   <?php while($row=mysql_fetch_array($result)) { echo " ".$row['dname']." "; } ?>
suhadma blog

Posting Komentar

Copyright © Software Info and Download / Template by : Urangkurai