<?php

session_start();



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

    header('Location: index.php');

    return;

}

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

    header('Location: staff_prospect_management.php');

}



include("connect.php");

$status = $_POST['status'] ?? "new";

$id = $_POST['id'];



$eve = "update res_prospect_management set status='$status' where id=$id";



if ($conn->query($eve) === TRUE) {

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

} else {

    $_SESSION['msg'] = "Error in record update";

}

header('Location: staff_prospect_management.php');



?>