<?php
session_start();

if (isset($_SESSION['q_index'])) {
    if ($_SESSION['q_index'] < count($_SESSION['questions']) - 1) {
        $_SESSION['q_index']++; // Move to the next question
    }
}
header("Location: cbtqmodule.php"); // Redirect back to the main exam page
exit();
?>
