もう一度私のコードでajaxが残っています。私は私のプロジェクトのライブ検索ajaxシステムを作っていますが、データをsearch.php &に送信すると、var_dump POST配列は空のポスト配列になります。ajaxを介して送信されたデータの後にPOST配列が空です
AJAX
function searching(string){
$.ajax({
url : "request/search.php",
type : "POST",
data : "search="+string,
type : "text",
beforeSend : function(http){
},
success : function(response,status,http){
alert(response);
},
error : function(http,status,error){
$('.response').html("<span class='error'>Something went wrong</span>");
$(".response").slideDown();
}
})
}
HTML
<form id="searchBox">
<p>
<input type="text" name="search" id="search" onkeyup="searching(this.value)" placeholder="Search here">
<button class="find" data-icon=""></button>
</p>
</form>
oopのおかげで私は気付かなかった –