<?php 
require_once('config/config.php');
require_once(CLASS_DIR.'dbClass.php');
$obj1 = new DBClass();

$sql2 = "SELECT * FROM ".TBL_CRN." where crn_id = '".$_REQUEST['crn']."'";
$rs2 = $obj1->executeQry($sql2,$link);
if($obj1->getrow()>0) {
	
	$row2 = $obj1->fetchrow();
	
	if($row2['status'] == '0'){
		?><font color='green'><b>Valid CRN.</b></font>
		<?php } else { ?>
			<font color='red'><b>CRN already in Used.</b></font>
		<?php } ?>
					
<?php } else { ?>
					<font color='red'><b>Invalid CRN.</b></font>
<?php
 } ?>					
					
