<?php
	if(ISSET($_POST['search'])){
		$keyword = $_POST['keyword'];
?>
<div class="cours-search-bx m-b30">
	<?php
		require 'conn.php';
		$query = mysqli_query($conn, "SELECT * FROM `courses` WHERE `courseName` LIKE '%$keyword%' ORDER BY `courseName`") or die(mysqli_error());
		while($fetch = mysqli_fetch_array($query)){
	?>
	<div>
		<a target="_blank" href="<?php echo base_url();?>/index.php/course/<?php echo $fetch['courseID']?>"><p class="cours-search-text"><?php echo ucwords(strtolower($fetch['courseName']))?></p></a>
	</div>
	<hr style="border-bottom:1px solid #ccc;"/>
	<?php
		}
	?>
</div>
<?php
	}
?>