标签:
jQuery ajax的前台代码:
PHP的后台代码:
header("Cache-Control: no-cache");
require_once("function.php");
switch ($_POST["action"]){
case 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 "wrong";http://www.mlybyby.com
}
break;
default:
break;
}
?>
标签:
原文地址:http://www.cnblogs.com/hljmly/p/5666776.html