0
你好朋友这是我的代码。jQuery用php变量发送post请求?
$.post("submit_investorform.php",{'flage':'firstOverviewsubmit','comname':comaname,'amoutwisr':amoutwisr,'user_id':<?php echo $value = isset($_GET['user_id']) ? $_GET['user_id'] : ""; ?>},function(result){
if(result.trim() == 'Insert'){
$(".noterror").html("Record Insert Successfully");
$(".noterror").show();
return false;
}else if(result.trim() == 'error'){
$(".errordisplay").html("Something was Wrong Please Try Again");
$(".errordisplay").show();
return false;
}else if(result.trim() == "update"){
$(".noterror").html("Record Updated Successfully");
$(".noterror").show();
return false;
}
});
我想要做的user_id设置然后发送到发布请求,否则它发送空白。 但jQuery返回语法错误。
请大家帮忙。
你正在得到什么确切的语法错误? 也是amoutwisr和comaname被定义的地方? – Mozak