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/update_dep_email.php
<?php
include 'backend.php';
foreach($_GET as $key => $value) {
	$get[$key] = filter($value);
}

$dep_email = mysql_real_escape_string($get['department_email']);
// check email
if(isset($get['cmd']) && $get['cmd'] == 'Update_Email') {

if(!isEmail($dep_email)) {
echo "Please enter a valid email address.";
exit();
  }	

if(isEmail($dep_email) && !empty($dep_email)){
//echo 'Email is set as '. $dep_email;
mysql_query("UPDATE `departments` SET
			`dep_email` = '$dep_email' where id = '$get[department_id]'") or die(mysql_error());
echo 'Department email set as '.$dep_email;	
exit();		

  }
}
?>