GIF89a;
Direktori : /home/serb/public_html/ |
Current File : /home/serb/public_html/loadData.php |
<? session_start(); include("lib/globals.php"); include("lib/common.php"); include("lib/functions.php"); $loadType=$_POST['loadType']; $loadId=$_POST['loadId']; if($loadType=="state"){ $sql="select id,name from states order by name asc"; }else{ $sql="select id,name from citys where states_id='".$loadId."' order by name asc"; } $res=execute_query($sql); $check=mysql_num_rows($res); if($check > 0){ $HTML=""; while($row=mysql_fetch_array($res)){ $HTML.="<option value='".$row['name']."'>".$row['1']."</option>"; } echo $HTML; } ?>