<?php include('../../config/setup.php');?>
<?php

if(isset($_POST['ps_add']))
{
 $timezone = new DateTimeZone("Asia/Kolkata" );
$date = new DateTime();
$date->setTimezone($timezone );
$today2=$date->format('s');	
$subimage=$_FILES['Add_ps_banner']['name'];
$subcatephoto="../../../photos/psbanner/".$subimage;
move_uploaded_file($_FILES["Add_ps_banner"]["tmp_name"],$subcatephoto);
$subcate=date('Y-m-d');
$addmaincate=mysqli_query($config,"insert into ps_master(ps_banner,ps_video_link,ps_type)
                                 values('$subcatephoto','".$_POST['Add_ps_video']."','".$_POST['Add_ps_master']."')");	
if($addmaincate==false)
{
 	
 	 echo "<script>window.location.href='../ps_banner.php?erro=0';</script>".mysqli_error();	 
}
else{
	
	echo "<script>window.location.href='../ps_banner.php?msg=505';</script>";	 

	
}	







}
?>




