prepare("INSERT INTO exams (title, description) VALUES (?, ?)"); $stmt->execute([$title, $description]); $exam_id = db()->lastInsertId(); header("Location: add_questions.php?exam_id=" . $exam_id); exit(); } catch (PDOException $e) { $error_message = "Gagal membuat ujian. Silakan coba lagi."; // error_log("Exam creation failed: " . $e->getMessage()); } } } ?> <?php echo $page_title; ?> - Ulangan Harian Online

Batal