jQuery ajax的前台代码:
PHP的后台代码:
header("Cache-Control: no-cache") ;
require_once("function.php");
switch ($_POST["action"]){
Fall 1:
$comid=verify_id($_POST["comid"]);
$jobid=verify_id($_POST["jobid"]);
$userid=verify_id($_POST["userid"]);
$appdate=time();
$hasapp=getValue ("select * from csj_appjob where jobid=$jobid and userid=$userid and comid=$comid","id");
if($hasapp==""){
$sql="insert into csj_appjob(comid,jobid,userid,appdate) Values($comid,$jobid,$userid,$appdate)";
query($sql);
echo "success";
}else{
echo „falsch“;
}
break;
Standard:
break;
}
?>
更多相关文章请关注PHP中文网(www.php.cn)!