I am newly to ajax and php .so cant understand actually what happened .Here i am using ajax with jquery for show the result in dropdownlist in php.Here i am retrieving the data from database and shows in dropdownlist but my code not working.it shows warning error.what is the problem.
<?php
include "connection.php";
$value;
$valueAcomoType;
$valueAcomoTypename;
$valueSuperArea;
$value=$_GET['projectid'];
$valueAcomoType=$_GET['accomo_scale_id'];
$valueAcomoTypename=$_GET['accomo_type'];
//$valueSuperArea=$_GET['Super_area_sqrft'];
if(isset($_GET['Super_area_sqrft'])){
$valueSuperArea=$_GET['Super_area_sqrft'];
}
$scaleID=$_GET['accomo_scale_id'];
$Accomodation=$_GET['accomo_scale'];
$AccomoType=$_GET['accomo_type'];
//$SuperArea = $_GET['Super_area_sqrft'];
$sql_super_area= "";
echo $sql_super_area="SELECT * from antheia.1bhk_accomodation_scale where accomo_scale_id='".$scaleID."'AND accomo_scale='".$Accomodation."' AND accomo_type='".$AccomoType."' AND project_id='".$value."'";
$resultArea = mysql_query($sql_super_area);
$SupArea = "area";
$zero = 0;
echo "<input name ='superarea' id = 'superarea'>";
echo "<input value ='".$zero."'> ". $SupArea."";
while ($row_super_area = mysql_fetch_array($resultArea)) {
$row_super_area['accomo_scale_id'];
$row_super_area['accomo_type'];
$row_super_area['Super_area_sqrft'];
echo "<input type = 'text' name = value=".$row_super_area['Super_area_sqrft']."/>";
}
?>
jquery file is here
<script type="text/javascript">
$(document).ready(function(){
$('#dropType').change(function(){
var value2 = $('#dropType').val();
alert(value2);
var projectId = $('#dropProjectList').val();
var element = value2.split("-");
var scaleID1=element[0];
var Accomodation=element[1];
var AccomoType=element[1];
var SuperArea;
var chk=$('#superarea').val();
$.ajax({url:"findSuperArea.php?accomo_scale_id="+scaleID+"& accomo_scale="+Accomodation+"&accomo_type="+AccomoType+"&Super_area_sqrft="+SuperArea+"& projectid="+projectId,success:function(result){
res2=result;
alert(res2);
$('#super_area').html(res2);
}});
});
});
</script>