<?php
session_start();
include('connect.php');
include('verify.php');
if ($_POST['Search']) {
$search = "Course_ID LIKE '%".$_POST['Search']."%' or
Course_Name LIKE '%".$_POST['Search']."%' or
Course_Desc LIKE '%".$_POST['Search']."%' or
Course_Price LIKE '%".$_POST['Search']."%' or
Course_Time LIKE '%".$_POST['Search']."%' or
Teacher.Teacher_Name LIKE '%".$_POST['Search']."%' ";
} else {
$search = "1";
}
$sql = " SELECT
Course_ID,
Course_Name,
Course_Desc,
Course_Price,
Course_Hour,
Teacher_Name,
Course.Date_Update
FROM Course
INNER JOIN Teacher ON Teacher.Teacher_ID = Course.Teacher_ID
WHERE ".$search."
ORDER BY Course.Date_Update ASC ";
$query = mysql_query($sql);
$num_row = mysql_num_rows($query);
?>