GIF89a;
Direktori : /home/serb/www/ |
Current File : /home/serb/www/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; } ?>