I have this
echo ' <a href=" '.$row["noti_link"] .' " class="notification-success active">';
And I want this query to run just when the user click this
mysqli_query("UPDATE ehr_noti SET noti_check=0, noti_check2=0 where noti_id = ".$row['noti_id']." ")
Any trick for this? I don't want to pass the variable via POST or GET then run the query for the appropriate link. I just want to run the query before going to the next page.
EDIT FOR THE REASON.
I have a while loop. And in my MYSQL there is a column for the text and the link. It's a notification bar. So whether if this
accepted that
when the user clicked on that, he will be transfered to a different link.