<?php
ob_start();
session_start();
include("../../../config.php");
$dte=date('d/m/Y');
$dtdoc=date('Y-m-d');
$dteE=date('Y-m-d h:i:s');
$added_by=$_SESSION['user'];
$added_on=date('Y-m-d h:i:s');
$sqll1="insert into lastupdated(pagename,dtype,date,sts)";
$sqll1.=" values(";
$sqll1.="'NPTEL Courses',";
$sqll1.="'edit',";
$sqll1.="'".$dte."',";
$sqll1.="'1')";
/* echo $sqll1; */
$UsQueryy1 =mysqli_query($conn,$sqll1);
$sqlBl="UPDATE nptle SET ";
$sqlBl=$sqlBl."name='".$_POST['name']."',";
$sqlBl=$sqlBl."year='".$_POST['year']."',";
$sqlBl=$sqlBl."title='".$_POST['title']."',";
$sqlBl=$sqlBl."description='".$_POST['description']."',";
$sqlBl=$sqlBl."link='".$_POST['link']."',";
$sqlBl=$sqlBl."dorder='".$_POST['dorder']."',";
$sqlBl=$sqlBl."added_by='".$added_by."',";
$sqlBl=$sqlBl."added_on='".$added_on."'";
$sqlBl=$sqlBl." where id='".$_POST['idD']."'";
$UsQuery=mysqli_query($conn,$sqlBl);
if($UsQuery){
header('location:'.$home_path.'/pages/master/editnptl.php?msg=success&id='.$_POST['idD']);
}else{
header('location:'.$home_path.'/pages/master/editnptl.php?msg=error&id='.$_POST['idD']);
}
?>
|