<?php //
require './PHPMailer/PHPMailerAutoload.php';
require './config/config.php';
$id = $_GET['id'];
if (isset($_REQUEST["id"])) {
$id = $_REQUEST["id"];
$cancel = $_REQUEST['cancel'];
$con = mysql_connect($host, $username, $password) or die("Can not connect DB");
if ($con) {
mysql_select_db($dbname, $con) or die("Can not select db");
mysql_query("SET NAMES utf8", $con);
$strSQL = "UPDATE tr_training_register SET ";
$sql = "update tr_training_register set confirm=2, fcancel='$cancel', confirm_date=now() where id=" . $id;
if (mysql_query($sql, $con)) {
$sql = "select training_id,empn from tr_training_register where id=" . $id;
$result=mysql_query($sql, $con);
$rs=mysql_fetch_object($result);
$sql = "select course_name,start_date,end_date from tr_training t,tr_course c where t.course_id=c.id and t.id=".$rs->training_id;
$resultC=mysql_query($sql, $con);
$rsC=mysql_fetch_object($resultC);
}
mysql_close($con);
}
}
?>
<script>history.back();</script>