<?php
include '../connect.php';
$id=$_POST['intern_id'];
$sql="UPDATE program_intern SET status='rejected' WHERE intern_id=$id AND status='pending'";
$result=mysqli_query($con,$sql);
if($result){
    echo "Rejected";
}
else{
echo mysqli_error($con);
}
?>