<?php

session_start(); 
    $u_uname = '';
    if (isset($_COOKIE['auth_token']))
    {
        $u_uname = $_COOKIE['auth_token'];
    }else{
        header("location:../login.php");
    }

include '../include/pay_csh_connection.php';

$company_name = $_POST['company_name'];
$catergory = $_POST['catergory'];
$email_id = $_POST['email_id'];
$phone_number = $_POST['phone_number'];
$sending_count = $_POST['sending_count'];

$sql = "INSERT INTO email_marketing(company_name ,catergory , email_id, phone_number,sending_count)
VALUES ('$company_name', '$catergory', '$email_id','$phone_number','$sending_count')";


if ($link->query($sql) === TRUE) {
header('Location: ../email_marketing.php?success=111');
    
} else {
    header('Location: ../email_marketing.php?error=112');
}



mysqli_close();

     

?>
