<?php 
session_start();
if (!isset($_SESSION["session_name"])) {
    header("Location:../index.php");
    exit;
}
if (isset($_GET["course_id"])) {
    $id = $_SESSION["session_name"];
    $course_id = $_GET["course_id"];
    require_once 'db_functions.php';
    $db = new db_functions();
    $enrolled = $db->getEnrollmentData($id, $course_id);
    if (!$enrolled["id"] == $course_id) {
        $course_info = $db->getCourseInfo($course_id);
        $db->enrollStudent($course_info["course_id"], $course_info["course_name"], $id);
        ?>
			<div class="container"> 
	
<div class="row">
	<div class="col-sm-7 col-sm-offset-2">
		<h1>Congratulations, you're enrolled!</h1>
		<h4 style="line-height:140%">
		<br>
		Welcome to Drixel, and welcome to your new course! We look forward to providing you with an extraordinary learning experience. If you have any questions at any time, please don’t hesitate to contact us at support@drixel-NUST.com. Your classroom is waiting!
		</h4>
		<br>
		<a href="./course_videos.php?course_id=<?php 
        if (isset($_GET["course_id"])) {
            echo $_GET["course_id"];
        }