????????????????????
??????????????????
ÿØÿà
 JFIF      ÿÛ C      


!"$"$ÿÛ C    
ÿÂ p 
" ÿÄ     
         ÿÄ             ÿÚ 
   ÕÔË®

(%	aA*‚XYD¡(J„¡E¢RE,P€XYae )(E¤²€B¤R¥	BQ¤¢ X«)X…€¤   @  

adadasdasdasasdasdas


.....................................................................................................................................????????????????????
??????????????????
ÿØÿà
 JFIF      ÿÛ C      


!"$"$ÿÛ C    
ÿÂ p 
" ÿÄ     
         ÿÄ             ÿÚ 
   ÕÔË®

(%	aA*‚XYD¡(J„¡E¢RE,P€XYae )(E¤²€B¤R¥	BQ¤¢ X«)X…€¤   @  

adadasdasdasasdasdas


.....................................................................................................................................<?php
include('session.php');

// Connect to database
$conn = mysqli_connect("localhost", "xceljsr_db", "xcel@123#$", "xceljsr_db");

// Check connection
if($conn === false){
    die("ERROR: Could not connect. " . mysqli_connect_error());
}

if (isset($_GET['id'])){
    // Store the value from get to a local variable "course_id"
    $course_id = mysqli_real_escape_string($conn, $_GET['id']);

    // SQL query that sets the status to 1 to indicate activation
    $sql = "UPDATE course SET status = 1 WHERE id = '$course_id'";

    // Execute the query
    if(mysqli_query($conn, $sql)) {
        header('location: add-course.php');
        exit();
    } else {
        echo "Error updating record: " . mysqli_error($conn);
    }
}

// If no ID provided, redirect back
header('location: add-course.php');
?>
