function City(level) { var cat1 = $("select#sehir1").val(); var cat2 = $("select#sehir2").val(); var cat3 = $("select#sehir3").val(); var cat4 = $("select#sehir4").val(); $.ajax({ type: "GET", data: "cat1=" + cat1 + "&cat2=" + cat2 + "&cat3=" + cat3 + "&cat4=" + cat4 + '&level=' + level+'&class=', url: "https://www.ilansatis.net/com/common/js/selectCityF.php", success: function(msg){ $("#sehir"+level+"div1").html(msg).show(); } }); }