prepare("UPDATE submissions SET status = 'Pending' WHERE id = ?"); $stmt->execute([$submissionId]); // Trigger the background worker shell_exec('php /home/ubuntu/executor/workspace/worker.php > /dev/null 2>&1 &'); } catch (PDOException $e) { // In a real app, log this error header('Location: analyst_dashboard.php?error=' . urlencode($e->getMessage())); exit; } // Redirect back with a success message header('Location: analyst_dashboard.php?refreshed=1'); exit;