It is only one SQL query:
<?php
$server="localhost";
$username="root";
$passwort="root";
$conn = mysqli_connect($server,$username,$passwort);
if (!$conn) die ("Not connect with server");
$table=mysqli_select_db($conn, "your_db");
if(!@table) die ("Not connected with your your_db.");
/////////////////////////////////////////////////////////////////////////////////////////
while($zaznam_ticket=mysqli_fetch_array($ost_ticket))
{
mysqli_query($conn, "UPDATE your_db
.ost_ticket
SET status_id
= $GET['ticket_status'] WHERE ost_ticket
.ticket_id
= $GET['ticket_id']");
}
?>
Be sure you have working backups.
Save it as PHP file and make a links "Accepted" and "Reject" with GET values for ticket_status and ticket_id.
Of course set connection to your database as needed.
Try it. If works, you can add other querries and fix all against SQL injection.