"; } if($_POST['a_lname']==''){ $error .= "Please enter your Last Name
"; } if($_POST['a_year']==''){ $error.="Please enter Year
"; } if($_POST['a_degree']==''){ $error.="Please enter Diploma/Degree
"; } if($_POST['a_mobile']==''){ $error.="Please enter Mobile
"; }else{ $regex = "^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$"; if(! preg_match("/^([a-z0-9\+_\-]+)(\.[a-z0-9\+_\-]+)*@([a-z0-9\-]+\.)+[a-z]{2,6}$/ix", $_POST['a_email'])){ $error.="Please enter a Valid Email Address
"; } } if($_POST['a_email']==''){ $error.="Please enter Email Address
"; } if($_POST['a_idcard']==''){ $error.="Please enter your ID Card number
"; } if($_POST['a_address']==''){ $error.="Please enter Postal Address
"; } if($_POST['a_spouse']==''){ $error.="Please enter Spouse
"; } if($error==''){ $query=" insert into alumnis set id='".$_POST['id']."', a_name='".$_POST['a_name']."', a_mname='".$_POST['a_mname']."', a_lname='".$_POST['a_lname']."', a_roll='".$_POST['a_roll']."', a_idcard='".$_POST['a_idcard']."', a_year='".$_POST['a_year']."', a_degree='".$_POST['a_degree']."', a_mobile='".$_POST['a_mobile']."', a_home='".$_POST['a_home']."', a_work='".$_POST['a_work']."', a_email='".$_POST['a_email']."', a_address='".$_POST['a_address']."', a_spouse='".$_POST['a_spouse']."' "; $conn = db_connection(); if ($conn->query($query) === TRUE) { $field_name = $_POST['a_name']; $field_mname=$_POST['a_mname']; $field_lname=$_POST['a_lname']; $field_roll=$_POST['a_roll']; $field_idcard=$_POST['a_idcard']; $field_year = $_POST['a_year']; $field_degree = $_POST['a_degree']; $field_mobile = $_POST['a_mobile']; $field_email = $_POST['a_email']; $field_address = $_POST['a_address']; $field_spouse = $_POST['a_spouse']; $mail_to = 'qasimnaeem@nca.edu.pk'; $subject = 'Message from a Alumni '.$field_name; $body_message = 'First Name: '.$field_name."\n"; $body_message.= 'Middle Name: '.$field_mname."\n"; $body_message.= 'Last Name: '.$field_lname."\n"; $body_message.= 'Roll #: '.$field_roll."\n"; $body_message.= 'ID card: '.$field_idcard."\n"; $body_message.= 'Year of Graduation: '.$field_year."\n"; $body_message.= 'E-mail: '.$field_email."\n"; $body_message.= 'Degree: '.$field_degree."\n"; $body_message.= 'Mobile: '.$field_mobile."\n"; $body_message.= 'Address: '.$field_address."\n"; $body_message.= 'Spouse: '.$field_spouse."\n"; $headers = 'From: '.$field_email."\r\n"; $headers .= 'Reply-To: '.$field_email."\r\n"; $mail_status = mail($mail_to, $subject, $body_message, $headers); if ($mail_status) { ?> " . $conn->error; } } } ?> NCA Lahore-Allumni
The College / Alumni

ALUMNI REGISTRATION FORM

Required
© 2014 Copyright - National College Of Arts, Lahore