include("admin/config/site-includes.php"); //echo $today=date('l, F d Y'); //print_r($_SESSION); $Q1="SELECT * FROM tbl_cms WHERE page_id='1' AND status='1'"; $Res1=mysqli_query($conObj, $Q1); $R1=mysqli_fetch_object($Res1); $Q2="SELECT * FROM tbl_cms WHERE page_id='8' AND status='1'"; $Res2=mysqli_query($conObj, $Q2); $R2=mysqli_fetch_object($Res2); if($_POST['mode']=="Subscribe") { $name=$_REQUEST['n_name']; $email=$_REQUEST['n_email']; $QC=mysqli_query($conObj, "SELECT * FROM tbl_newsletter_subscriber WHERE subscriber_email='".$email."'"); $N=mysqli_num_rows($QC); if($N) { header("Location:home.php?msg=err"); } else { $Q=mysqli_query($conObj, "INSERT INTO tbl_newsletter_subscriber (updtime,subscriber_name,subscriber_email) VALUES(".mktime().",'".$name."','".$email."')"); header("Location:home.php?msg=success"); } } ?>