<?php
error_reporting(0);
session_start();
include '../include/connection.php';
$conn     = db();
@extract($_REQUEST);
$folder='../upload/banner/';
$file=time().@str_replace(' ','-',$_FILES['image']['name']);
if(move_uploaded_file(@$_FILES['image']['tmp_name'],$folder.$file))
{
$image=$file;
}
$sql="insert into tbl_banner set
banner_category='".$_REQUEST['banner_category']."',
banner_title='".$_REQUEST['banner_title']."',
banner_position='".$_REQUEST['banner_position']."',
banner_link='".$_REQUEST['banner_link']."',
banner_alt='".$_REQUEST['banner_alt']."',
pg_status='".$_REQUEST['pg_status']."',
banner_image='".$image."'";
if(mysqli_query($conn,$sql))
{
$_SESSION['add-banner-msg']="Add Successfully";
?>
<script>window.location.href='add-banner.php'</script>
<?php } ?>