<?php

session_start();



if (!isset($_SESSION['tulsilogin'])) {

    header('Location: index.php');

    return;

}

if (!isset($_POST['id'])) {

    header('Location: prospect_management.php');

}



include("connect.php");

$prospectId = $_POST['id'];



if (isset($_POST['status']) && isset($_POST['date'])) {

    $status = $_POST['status'];

    $date = $_POST['date'];



    $eve1 = "insert into res_prospect_management_follow_up (prospectid,status,date) values('$prospectId','$status','$date')";

    $re1 = mysqli_query($conn, $eve1);

}

$_SESSION['msg'] = "Record saved successfully";

header('Location: prospect_management_details.php?id=' . $prospectId);

?>