Verileri göndermenin ve bu verilere bağlı olarak yanıt almanın en iyi yolu nedir? Birlikte bunu başarmak için unsucessfully çalıştıkjquery ile aynı ajax isteğinde veri gönderip alma
$test = $_POST['test'];
echo json_encode($test);
:
istek için kullanılan PHP dosyasını düşünün deneyin budata: '{test : worked}'
ait Yerine
$.ajax({
type: "POST",
dataType: "json",
data: '{test : worked}',
url: 'ajax/getDude.php',
success: function(response) {
alert(response);
}
});
'veriler: {testi: 'çalışmış'} – climbage