<?php  session_start();

include("../../config/config.php");

include("../validateuserlogin.php");



$title	=   secureSuperGlobalPOST($_REQUEST[SESS_MASTER.'title']);

$description	=   secureSuperGlobalPOST($_REQUEST[SESS_MASTER.'description']);

$keyword	    =   secureSuperGlobalPOST($_REQUEST[SESS_MASTER.'keyword']);

$page	=   secureSuperGlobalPOST($_REQUEST[SESS_MASTER.'page']);




$datecreated=date("Y-m-d H:i:s");



if($_POST OR $_FILES){

  try{

  

		 $user_id=$_SESSION[ADD_TAG.'_UserId'];

         

		 $olgaquerys="UPDATE meta_tag_setting SET datecreated='$datecreated' " ;



     

     if(!empty($title)){

      $olgaquerys = $olgaquerys." ,title='$title'";

     }

     if(!empty($description)){

      $olgaquerys = $olgaquerys." ,description='$description'";

     }



     if(!empty($keyword)){

      $olgaquerys = $olgaquerys." ,keyword='$keyword'";

     }
    

    

       $olgaquerys = $olgaquerys." WHERE pages='$page'";

		$stmts = $conn->prepare($olgaquerys);

    echo $olgaquerys;

    $_SESSION['message'] = "Save Successfully";

		if($stmts->execute()){


        
			header("location:../update-setting-page.php?page=".$page);



			}

		

 

 

   }

         

       /*error*/

        catch(PDOException $exception){

            die('ERROR: ' . $exception->getMessage());

        }

    }





    ?>