<?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;
}
$page_url_link =  preg_replace('/\s+/', '-', strtolower(str_replace('-',' ',$_REQUEST['pg_url'])));
$sql="insert into tbl_more_url set
pg_name='".$_REQUEST['pg_name']."',
pg_url='".$page_url_link."',
prod_cat_id='".$_REQUEST['cid']."',
pg_meta_title='".$_REQUEST['pg_meta_title']."',
pg_meta_keyword='".$_REQUEST['pg_meta_keyword']."',
pg_meta_desc='".$_REQUEST['pg_meta_desc']."',
description='".$_REQUEST['description']."',
pg_status='".$_REQUEST['pg_status']."',
image='".$image."'";
if(mysqli_query($conn,$sql))
{
$_SESSION['add-page-msg']="Add Successfully";
}
?>
<script>window.location.href='add-more-url.php?cid=<?php echo $_REQUEST['cid'];?>'</script>