I have an action in file viewreport it is about ticket:
if(isset($_GET['closeticket']) == 'true')
{
$db->query("update tickets set status='Closed' where id='$id'");
header("Location: viewreport?id=".$id."");
But even an user can close a ticket that doesn't belong to him via url. So i want to block direct url action.
Here is the action
a href "viewreport?closeticket=true&id= <?php echo $id;?>" class="btn btn-danger" id="">Close</a>