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/addbook.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');

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



$sql="insert into book(booktype,img,edition,title,namee,yearr,pages,issbn,purlink,added_by,added_on)";
	$sql.=" values(";
		$sql.="'".$_POST['booktype']."',";
	$sql.$sql.="'".$fileNamephoto1."',";
	$sql.="'".$_POST['edition']."',";
	$sql.="'".$_POST['title']."',";
	$sql.="'".$_POST['namee']."',";
	$sql.="'".$_POST['yearr']."',";
	$sql.="'".$_POST['pages']."',";
	$sql.="'".$_POST['issbn']."',";
	$sql.="'".$_POST['purlink']."',";
	$sql.="'".$added_by."',";
	$sql.="'".$added_on."')";
//echo $sql; 
//die(); 
$UsQuery =mysqli_query($conn,$sql);

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

?>