$control = new Controller(); $view = new View(); $msg = $view->getcollege(); $fromhod = $msg[0]; $todean = $msg[1]; $msg = $view->gethodpermission(); if (!empty($_POST['rejected'])) { //Do all the submission part or storing in DB work and all here header('Location: reasonhod.php'); } if (!empty($_POST['Accept'])) { $message = $_POST['textarea']; $temp = $_POST['hello']; $row = $view->getuser($temp); $subject = "Mail from hod in regard of leave '" . $row[0] . "'"; $control->responcehod($row[0]); //echo "<script>alert('".$subject."')</script>";//echo $message; $headers = "From:" . $fromhod; //echo "<script>alert('".$row[0]."')</script>";//echo $message; mail($todean, $subject, "Dear Sir,\n\t.'{$message}'.\n\t please http://designghar.com/flm/deanresponce.php to for give your responce", $headers); //mail($todean,$subject,$message,$headers); //$control->responcehod(); //echo "Mail Sent."; //Do all the submission part or storing in DB work and all here } ?> <!--[if lt IE 7 ]> <html lang="en" class="ie6 ielt8"> <![endif]--> <!--[if IE 7 ]> <html lang="en" class="ie7 ielt8"> <![endif]--> <!--[if IE 8 ]> <html lang="en" class="ie8"> <![endif]--> <!--[if (gte IE 9)|!(IE)]><!--> <html lang="en"> <!--<![endif]--> <head>