following is my code that I have used,
if ($status=='Pending'){
echo '<td>'.'<a href="leave_request.php?leave_id='.$id1.'"><input type="button" name="submit" class="btn btn-success" value="Approve" "></button></a>'.'</td>'
if(isset($_POST['submit'])){
$id2=$_GET['leave_id'];
$result= "UPDATE emp_leaves SET approval_status='Accepted' WHERE leave_id='$id2'";
$query=mysql_query($result);
}
}
When user click Accept button, URL will get leave_id of clicked leave_request and will reload page itself. I want to update leave_status column of identified leave_id as 'accepted' while reloading the page. How can I do it.