File: /home/bibuzptr/elearning.bibu-edu.us/old 20th oct/enroll.php
<?php
include_once("includes/db_connect.php");
if($_GET['courseid']!="" && $_GET['stdid']!=""){
$courseid= $_GET['courseid'];
$stdid= $_GET['stdid'];
$courseurl=$_GET['courseurl'];
if(mysqli_num_rows(mysqli_query($con,"SELECT * FROM mycourses WHERE courseid='$courseid' AND studentid='$stdid'"))<1){
mysqli_query($con,"INSERT INTO mycourses(courseid,studentid) VALUES('$courseid','$stdid')");
}
header( "refresh:5;url=dashboard/ongoing-course/".$courseurl );
// header("Location:dashboard/ongoing-course/".$courseurl);
}else{
header("Location:index");
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0">
<title>Breakthrough Open University</title>
<link rel="shortcut icon" type="image/x-icon" href="assets/img/logo.png">
<link rel="stylesheet" href="assets/css/bootstrap.min.css">
<link rel="stylesheet" href="assets/plugins/fontawesome/css/fontawesome.min.css">
<link rel="stylesheet" href="assets/plugins/fontawesome/css/all.min.css">
<link rel="stylesheet" href="assets/css/owl.carousel.min.css">
<link rel="stylesheet" href="assets/css/owl.theme.default.min.css">
<link rel="stylesheet" href="assets/plugins/slick/slick.css">
<link rel="stylesheet" href="assets/plugins/slick/slick-theme.css">
<link rel="stylesheet" href="assets/plugins/select2/css/select2.min.css">
<link rel="stylesheet" href="assets/plugins/aos/aos.css">
<link rel="stylesheet" href="assets/css/style.css">
</head>
<body>
<section class="home-slide d-flex align-items-center">
<?php include_once("includes/header.php") ?>
<div class="container" style="margin:1%">
<div class="row">
<div class="col-md-3"></div>
<div class="col-md-6">
<div class="card" style="margin-top:5%;border: 1px solid #e9ecef;">
<div class="card-body">
<center>
<i style="color:green" class="fa fa-check fa-6x"></i>
<h2 style="color:green">Enrolled Successfully</h2>
<p> </p>
<p>
<i style="color:green" class="fa fa-spinner fa-spin fa-2x"> </i> Redirecting...
</p>
</center>
</div>
</div>
</div>
<div class="col-md-3"></div>
</div>
</div>
</section>
<?php include_once('includes/footer.php') ?>
</body>
</html>