HOME


Mini Shell 1.0
DIR:/home/drsekaran/public_html/admin/pages/master/action/
Upload File :
Current File : /home/drsekaran/public_html/admin/pages/master/action/addpa.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');
$sts="1";

$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);


$filephoto1=$_FILES['img1']['name'];
$uploadphoto1=$_SERVER['DOCUMENT_ROOT'].$download_path; 
$fileNamephoto1=$filephoto1;
$target_pathphoto1 = $uploadphoto1 .  $fileNamephoto1;
move_uploaded_file($_FILES['img1']['tmp_name'], $target_pathphoto1);


$filephoto2=$_FILES['img2']['name'];
$uploadphoto2=$_SERVER['DOCUMENT_ROOT'].$download_path; 
$fileNamephoto2=$filephoto2;
$target_pathphoto2 = $uploadphoto2 .  $fileNamephoto2;
move_uploaded_file($_FILES['img2']['tmp_name'], $target_pathphoto2);

$filephoto3=$_FILES['img3']['name'];
$uploadphoto3=$_SERVER['DOCUMENT_ROOT'].$download_path; 
$fileNamephoto3=$filephoto3;
$target_pathphoto3 = $uploadphoto3 .  $fileNamephoto3;
move_uploaded_file($_FILES['img3']['tmp_name'], $target_pathphoto3);





$sql="insert into pataward(name,title,link,pdf,img1,img2,img3,status,added_by,added_on)";
	$sql.=" values(";
		$sql.="'".$_POST['name']."',";
	$sql.="'".$_POST['title']."',";
	$sql.="'".$_POST['link']."',";
	$sql.="'".$fileNamephoto."',";
		$sql.="'".$fileNamephoto1."',";
			$sql.="'".$fileNamephoto2."',";
				$sql.="'".$fileNamephoto3."',";
					$sql.="'".$sts."',";
	$sql.="'".$added_by."',";
	$sql.="'".$added_on."')";
//echo $sql; 
//die(); 
$UsQuery =mysqli_query($conn,$sql);

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

?>