Kanjut SHELL
Server IP : 172.16.15.8  /  Your IP : 3.133.117.107
Web Server : Apache
System : Linux zeus.vwu.edu 4.18.0-553.27.1.el8_10.x86_64 #1 SMP Wed Nov 6 14:29:02 UTC 2024 x86_64
User : apache ( 48)
PHP Version : 7.2.24
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /home/brmorrison/www/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/brmorrison/www/registartion.php
<!-- registration.php -->

<?php
session_start();

if ($_SERVER["REQUEST_METHOD"] === "POST") {
    if (isset($_SESSION["name"]) && isset($_SESSION["gender"]) && isset($_SESSION["grade"])) {
        $name = $_SESSION["name"];
        $gender = $_SESSION["gender"];
        $grade = $_SESSION["grade"];

        $csCourses = isset($_POST["csCourses"]) ? $_POST["csCourses"] : array();
        $mathCourses = isset($_POST["mathCourses"]) ? $_POST["mathCourses"] : array();
    } else {
        header("Location: stuForm.html");
        exit();
    }
} else {
    header("Location: stuForm.html");
    exit();
}
?>
    <center>
        <font color="blue" size="3">
            <h2>Registration Summary</h2>
        </font>
    </center>
    <hr>

    <p><strong>Name:</strong> <?php echo $name; ?></p>
    <p><strong>Gender:</strong> <?php echo $gender; ?></p>
    <p><strong>Grade:</strong> <?php echo $grade; ?></p>

    <?php
    if (!empty($csCourses)) {
        echo "<p><strong>CS Courses:</strong></p><ul>";
        foreach ($csCourses as $course) {
            echo "<li>$course</li>";
        }
        echo "</ul>";
    }

    if (!empty($mathCourses)) {
        echo "<p><strong>Math Courses:</strong></p><ul>";
        foreach ($mathCourses as $course) {
            echo "<li>$course</li>";
        }
        echo "</ul>";
    }
    ?>

Stv3n404 - 2023