<?php
include "auth.php";
include "db.php";

$product_id = $_POST['product_id'];
$offer_title = $_POST['offer_title'];
$badge = $_POST['badge'];
$old_price = $_POST['old_price'];
$new_price = $_POST['new_price'];
$offer_text = $_POST['offer_text'];
$start_date = $_POST['start_date'];
$end_date = $_POST['end_date'];

$conn->query("
INSERT INTO offers(

    product_id,
    offer_title,
    badge,
    old_price,
    new_price,
    offer_text,
    start_date,
    end_date

)

VALUES(

    '$product_id',
    '$offer_title',
    '$badge',
    '$old_price',
    '$new_price',
    '$offer_text',
    '$start_date',
    '$end_date'

)
");

header("Location:add_offer.php");
?>