prepare("INSERT INTO results (shooter_id, result_text, comments) VALUES (?, ?, ?)"); $stmt->execute([$shooter_id, $result_text, $comments]); // Redirect to avoid form resubmission, with a success flag header("Location: index.php?success=1"); exit; } } // Fetch existing results for the shooter $stmt = $pdo->prepare("SELECT * FROM results WHERE shooter_id = ? ORDER BY created_at DESC"); $stmt->execute([$shooter_id]); $results = $stmt->fetchAll(); ?>
You have not entered any results yet.