session_start();
include "../inc/config.inc.php";
//echo "$_SESSION[m_login]
$_SESSION[m_id]";
$job_id=$_GET[job_id];
$status=$_GET[status];
//echo "$job_id=[job_id]
$status=[status]
";
?>
Untitled Document
if(!isset($_SESSION[m_login])) {
?>
exit();}
?>
if($status=="apply"){
$date=date("Y-n-j");
$s1="select * from emp_apply_job where emp_id='$_SESSION[m_id]' and job_id='$job_id'";
$re1=mysql_query($s1) or die("ERROR บรรทัด 39");
$n1=mysql_num_rows($re1);
if($n1>=1){
?>
}else{
$s=mysql_query("INSERT INTO `emp_apply_job` (`emp_id` ,`job_id` ,`apply_date` )VALUES ('$_SESSION[m_id]', '$job_id', '$date')") or die("ERROR บรรทัด 56");
mysql_close();
echo "";
}
}else if($status=="save"){
$date=date("Y-n-j");
$s1="select * from emp_save_job where emp_id='$_SESSION[m_id]' and job_id='$job_id'";
$re1=mysql_query($s1) or die("ERROR บรรทัด 61");
$n1=mysql_num_rows($re1);
if($n1>=1){
?>
}else{
$s=mysql_query("INSERT INTO `emp_save_job` (`emp_id` ,`job_id` ,`save_date` )VALUES ('$_SESSION[m_id]', '$job_id', '$date')") or die("ERROR บรรทัด 78");
mysql_close();
echo "";
}
}
?>