jQuery ajax 的前台程式碼:
$("#form1").submit
(
function()
alse;
}
);
函數登入( )
{
var comid = $("#comid").val();
var jobid = $("#jobid").val() ;
var userid = $("#userid").val() ;
$.ajax({
type: "POST",
url: "../include/ajax.php",
data: "action= 1" + "&comid=" + comid + "&jobid=" +obid + "&userid=" + userid,
beforeSend: function(){
},
success: function(msg){
if(msg=="success "{alert(){
if(msg=="success "{alert(){alertffido(msg=="success){,請等資訊通知! ! -Control: no-cache");
require_once("function.php");
switch ($_POST["action"]){
情況1:
$comid=verify_id($_POST["comid"]);
$jobid=verify_id($_POST[ "jobid"]);
$userid=verify_id($_POST["userid"]);
$appdate=time();
$ jobid=$jobid and userid=$userid和comid=$comid","id");
if($hasapp==""){
$sql="插入csj_appjob(comid,jobid,userid,appdate) 值( $comid,$jobid,$userid ,$appdate)";
query($sql);
echo "成功";
}else{
echo "錯誤";
}
ault;
defbreak:
breakbreak;break; }
?>
更多相關文章請追蹤PHP中文網(www.php.cn)!