HOME


Mini Shell 1.0
DIR:/home/drsekaran/www/admin/pages/master/action/
Upload File :
Current File : /home/drsekaran/www/admin/pages/master/action/addlatest.php
<?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');

$filephoto=$_FILES['pdf']['name'];
$uploadphoto=$_SERVER['DOCUMENT_ROOT'].$download_path; 
$fileNamephoto=$filephoto;
$target_pathphoto = $uploadphoto .  $fileNamephoto;
move_uploaded_file($_FILES['pdf']['tmp_name'], $target_pathphoto);

$sql="insert into latest(title,link,pdf,added_by,added_on)";
	$sql.=" values(";
	$sql.="'".$_POST['title']."',";
	$sql.="'".$_POST['link']."',";
	$sql.="'".$fileNamephoto."',";
	$sql.="'".$added_by."',";
	$sql.="'".$added_on."')";
//echo $sql; 
//die(); 
$UsQuery =mysqli_query($conn,$sql);

if($UsQuery){
	header('location:'.$home_path.'/pages/master/addlatest.php?msg=success&rcpt=');
}else{
	header('location:'.$home_path.'/pages/master/addlatest.php?msg=error');	
}

?>