Can anyone please point out exactly what I am doing wrong, I am trying to make a php call when a selected value is changed.
代码没有回显 php 文件中的信息。
查询代码
// Skill sort on change
$('#order_by').on('change', function() {
$.ajax({
type: "POST",
url: "sort_skill_be.php",
data: {skill:this.value}
}).done(function(result){
console.log(result)
})
});
PHP代码
<?php
session_start();
$skill_sort = $_POST['skill'];
echo $skill_sort;
echo 'I got in here';
?>
感谢您的帮助和时间!
编辑:它现在可以正常工作,感谢所有帮助!