<?php
session_start();
if (!isset($_SESSION['reusername'])) { echo 'Sorry You Dont Have permissions to View this Page!'; exit();}
require_once 'includes/database.php';
											// gets select of All booked insurance from provider sup
$db=new MySQLDatabase();
$db->open_connection();
if (isset($_REQUEST['sup'])){
	$sid = $_REQUEST['sup'];
	$sql = mysqli_query($db->connection, "SELECT insrecs.insno, insrecs.regno, insrecs.cname FROM insrecs WHERE insrecs.supp = '$sid' ORDER BY insno DESC;") or die (mysqli_error($db->connection) );
	echo '<option value=""></option>';
	while ($row = mysqli_fetch_array($sql, MYSQLI_ASSOC)){
		echo '<option value="'.$row['insno'].'" >'.$row['insno'].' - '.$row['cname'].' - '.$row['regno'].'</option>';
		}
$db->close_connection();	
}   
?>	  