prepare($query);
$stmt->bind_param("i", $Course_ID);
$stmt->execute();
$result = $stmt->get_result();
while ($row = $result->fetch_assoc()) {
$Teacher_ID = $row["Teacher_ID"];
$courseID = $row["Course_ID"];
$Program_ID = $row["Program_ID"];
$Priority = $row["Priority"];
if($Priority == 1)
{
$Priority = "First";
}else if($Priority == 2){
$Priority = "Second";
}
// Fetch additional schedule details for this combination
$fetchStmt = $mysqli->prepare("SELECT First_Name, Last_Name, Time_Slot FROM teacher_profile WHERE Teacher_ID = ?");
$fetchStmt->bind_param('i', $Teacher_ID);
$fetchStmt->execute();
$fetchStmt->bind_result($First_Name, $Last_Name, $Time_Slot);
$fetchStmt->fetch();
$fetchStmt->close();
// Fetch additional schedule details for this combination
$fetchStmts = $mysqli->prepare("SELECT Program_Name FROM Programs WHERE Program_ID = ?");
$fetchStmts->bind_param('i', $Program_ID);
$fetchStmts->execute();
$fetchStmts->bind_result($Program_Name);
$fetchStmts->fetch();
$fetchStmts->close();
echo "
";
}
$stmt->close();
$mysqli->close();
}
//if (isset($_POST["Program_ID"]) && isset($_POST["Group_ID"])) {
// $programID = $_POST["Program_ID"];
// $groupID = $_POST["Group_ID"];
//
// $query = "SELECT Course_ID, Course_Name FROM Courses WHERE Program_ID = ?";
// $stmt = $mysqli->prepare($query);
// $stmt->bind_param("i", $programID);
// $stmt->execute();
// $result = $stmt->get_result();
//
// while ($row = $result->fetch_assoc()) {
// echo "