Current Path : /home/c247essa/public_html/

Linux c22487.sgvps.net 3.12.18-clouder0 #1 SMP Tue Oct 9 18:14:47 EEST 2018 x86_64

Upload File :
Current File : /home/c247essa/public_html/check_dep_email.php
<?php
include 'backend.php';
page_protect();

foreach($_GET as $key => $value) {
	$get[$key] = filter($value);
}
$dep_name = mysql_real_escape_string($get['depName']);

if(isset($get['cmd']) && $get['cmd'] == 'check') {

$availability = mysql_query("select * from departments where dep_name LIKE '%$dep_name%'") or die(mysql_error());

$rows_availability = mysql_fetch_array($availability);
$dpt_email = $rows_availability['dep_email'] ;
$total = mysql_num_rows($availability);
	
	if ($total > 0 ){
	echo $dpt_email;
	} else{
	echo 'Department E-mail not set';
	}
	exit();
	
}
?>