Viewing file: EditInstructor.php (4.75 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
";
echo " กรุณาทำการ Login ก่อน ";
echo "";
exit();
}
else {
/** Configuration */
require_once( "../configuration.php" );
require_once( $_Config_absolute_path . "/includes/framework.php" );
require_once( "../include/Function.php" );
require_once( "../include/FunctionDB.php" );
/** Create Database Object */
$dbObj = new DBConn;
//=== SESSION
$Username = $valid_user;
/** Config Table for This Page */
$myTable = "instructor_tb";
$myTableFK = "code";
/** Receive values */
$First_name = $_POST['First_name'];
$Name = trim( $_POST['Name'] );
$Lastname = trim( $_POST['Lastname'] );
$Status = $_POST['Status'];
$Sex = $_POST['Sex'];
$Degree = trim( $_POST['Degree'] );
$Exper = htmlspecialchars( trim( $_POST['Exper'] ) );
$Skill = htmlspecialchars( trim($_POST['Skill'] ) );
$Addr_work = htmlspecialchars( trim($_POST['Addr_work'] ) );
$Addr_home = htmlspecialchars( trim($_POST['Addr_home'] ) );
$Tel = trim( $_POST['Tel'] );
$Email = trim( $_POST['Email'] );
$Path = $_Config_live_site."/personal_pic";
//--- Table --> 'research_tb'
//### Upload Image File
if( $_FILES['Img1']['name'] != "" ) {
$Img1 = $_FILES['Img1']['name'];
@copy( $_FILES['Img1']['tmp_name'] , $Path."/".$Img1 );
@unlink( $_FILES['Img1']['tmp_name'] );
$query = " UPDATE $myTable SET First_name='$First_name',Name='$Name', Lastname='$Lastname', Sex='$Sex', Status='$Status', Degree='$Degree', Exper='$Exper', Skill='$Skill', Img1='$Img1', Addr_work='$Addr_work', Addr_home='$Addr_home', Tel='$Tel', Email='$Email' WHERE code='$code' ";
$result = $dbObj->runQuery($query);
$dbObj->freeresult($result);
}
$Img1Name = "";
$query = " UPDATE $myTable SET First_name='$First_name',Name='$Name', Lastname='$Lastname', Sex='$Sex', Status='$Status', Degree='$Degree', Exper='$Exper', Skill='$Skill', Img1='$Img1', Addr_work='$Addr_work', Addr_home='$Addr_home', Tel='$Tel', Email='$Email' WHERE code='$code' ";
$result = $dbObj->runQuery($query);
$dbObj->freeresult($result);
} # else
?>
ข้อมูลทั่วไปบุคลากร - ข้อมูลงานวิจัย - เพิ่มประวัติผลงานวิจัย
freeresult($result0);
/** Close the Database */
$dbObj->disconn();
/** Unset Class */
unset($dbObj);
?> bool(false)
|