<?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';

$campaign_name = $_POST['campaign_name'];
$campaign_catergory = $_POST['campaign_catergory'];
$daily_status = $_POST['daily_status'];
$sql = "INSERT INTO campaihn (campaign_name , campaign_catergory , daily_status)
VALUES ('$campaign_name', '$campaign_catergory', '$daily_status')";

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



mysqli_close();

     


?>