connect_error) echo "115";//die("Connection failed: " . $conn->connect_error);
else{
mysqli_set_charset($conn,"utf8");
$stmt = $conn->prepare("INSERT INTO ".TABLE. " (`NAME`,`MOBILE`,EMAIL,LOGIN_EMAIL,`FATHER_NAME`, `GUARDIAN_NAME`, `ADDRESS`,`DOB_DATE`,`DOB_MONTH`,`DOB_YEAR`,`GENDER`, `RELIGION`, `CASTE`, `DISABILITY`, `BLOOD_GROUP`, `BLOOD_DONATED`, `UNIVERSITY`, `COLLEGE`, `YEAR_OF_PASSING`, `H_NM`, `H_FM`, `H_PM`, `H_MO`, `G1_NM`, `G1_FM`, `G1_PM`, `G1_MO`, `G2_NM`, `G2_FM`, `G2_PM`, `G2_MO`, `SEC_NM`, `SEC_FM`, `SEC_PM`, `SEC_MO`, `AGGREGATE`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,?,?)");
$stmt->bind_param("ssssssssssssssssssssssssssssssssssss", $admission["NAME"],$admission["MOBILE"],$admission["EMAIL"], $admission["LOGIN_EMAIL"], $admission["FATHER_NAME"],$admission["GUARDIAN_NAME"],$admission["ADDRESS"],$admission["DOB_DATE"],$admission["DOB_MONTH"],$admission["DOB_YEAR"],$admission["GENDER"],$admission["RELIGION"],$admission["CASTE"],$admission["DISABILITY"],$admission["BLOOD_GROUP"],$admission["BLOOD_DONATED"],$admission["UNIVERSITY"],$admission["COLLEGE"],$admission["YEAR_OF_PASSING"],$admission["H_NM"],$admission["H_FM"],$admission["H_PM"],$admission["H_MO"],$admission["G1_NM"],$admission["G1_FM"],$admission["G1_PM"],$admission["G1_MO"],$admission["G2_NM"],$admission["G2_FM"],$admission["G2_PM"],$admission["G2_MO"],$admission["G2_NM"],$admission["G2_FM"],$admission["G2_PM"],$admission["G2_MO"], $AGGREGATE);
//echo "116";
if($stmt->execute()){
$echoinfo01= '
Application Form Successfully Submitted !
Now proceed to print
';
}
else{
echo "Error:
Contact Web admin " .mysqli_error($conn); exit();
}$tsid=mysqli_insert_id($conn);
$stmt->close();
}$conn->close();
$okk=0;
$target_dir = getcwd(). "/uploads/photo/";
$target_file = $target_dir . $tsid.'.jpg';
$uploadOk = 1;
$imageFileType = pathinfo($target_file,PATHINFO_EXTENSION);
// Check if image file is a actual image or fake image
if(isset($_POST["submit"])) {
$check = getimagesize($_FILES["Photo"]["tmp_name"]);
if($check !== false) {
echo "File is an image - " . $check["mime"] . ".";
$uploadOk = 1;
} else {
echo "Photo -File is not an image.
";
$uploadOk = 0;
}
}
// Check if file already exists
if (file_exists($target_file)) {
echo "Photo -File , file already exists, contact web admin
";
$uploadOk = 0;
}
// Check file size
if ( $_FILES["Photo"]["size"] >150000) {
echo "Photo -File maintain file size.
";
$uploadOk = 0;
}
// Allow certain file formats
if($imageFileType != "jpg" ) {
echo "Photo -File , only JPG files are allowed.
";
$uploadOk = 0;
}
// Check if $uploadOk is set to 0 by an error
if ($uploadOk == 0) {
echo "Photo -File , your file was not uploaded.
";
// if everything is ok, try to upload file
} else {
if (move_uploaded_file($_FILES["Photo"]["tmp_name"], $target_file)) {
echo "The Photo -File ". basename( $_FILES["Photo"]["name"])." has been uploaded.
"; $okk=$okk+1;
} else {
echo "Photo -File , there was an error uploading your file.
";
}
}
$target_dir = getcwd(). "/uploads/sign/";
$target_file = $target_dir . $tsid.'.jpg';
$uploadOk = 1;
$imageFileType = pathinfo($target_file,PATHINFO_EXTENSION);
// Check if image file is a actual image or fake image
if(isset($_POST["submit"])) {
$check = getimagesize($_FILES["sign"]["tmp_name"]);
if($check !== false) {
echo "File is an image - " . $check["mime"] . ".
";
$uploadOk = 1;
} else {
echo "Sign - File is not an image.
";
$uploadOk = 0;
}
}
// Check if file already exists
if (file_exists($target_file)) {
echo "Sign - , file already exists, contact web admin
";
$uploadOk = 0;
}
// Check file size
if ( $_FILES["sign"]["size"] >150000) {
echo "Sign - maintain file size.
";
$uploadOk = 0;
}
// Allow certain file formats
if($imageFileType != "jpg" ) {
echo "Sign - , only JPG files are allowed.
";
$uploadOk = 0;
}
// Check if $uploadOk is set to 0 by an error
if ($uploadOk == 0) {
echo "Sign - , your file was not uploaded.
";
// if everything is ok, try to upload file
} else {
if (move_uploaded_file($_FILES["sign"]["tmp_name"], $target_file)) {
echo "Sign - file ". basename( $_FILES["sign"]["name"]). " has been uploaded.
"; $okk=$okk+1;
} else {
echo "Sign - , there was an error uploading your file.
";
}
}
$target_dir = getcwd(). "/uploads/mark/";
$target_file = $target_dir . $tsid.'.jpg';
$uploadOk = 1;
$imageFileType = pathinfo($target_file,PATHINFO_EXTENSION);
// Check if image file is a actual image or fake image
if(isset($_POST["submit"])) {
$check = getimagesize($_FILES["mark"]["tmp_name"]);
if($check !== false) {
echo "File is an image - " . $check["mime"] . ".
";
$uploadOk = 1;
} else {
echo "Marksheet -File is not an image.
";
$uploadOk = 0;
}
}
// Check if file already exists
if (file_exists($target_file)) {
echo "Marksheet file already exists, contact web admin
";
$uploadOk = 0;
}
// Check file size
if ( $_FILES["mark"]["size"] >850000) {
echo "Marksheet -File maintain file size.
";
$uploadOk = 0;
}
// Allow certain file formats
if($imageFileType != "jpg" ) {
echo "Marksheet -File , only JPG files are allowed.
";
$uploadOk = 0;
}
// Check if $uploadOk is set to 0 by an error
if ($uploadOk == 0) {
echo "Marksheet -File, your file was not uploaded.
";
// if everything is ok, try to upload file
} else {
if (move_uploaded_file($_FILES["mark"]["tmp_name"], $target_file)) {
echo "Marksheet file ". basename( $_FILES["mark"]["name"]). " has been uploaded.
"; $okk=$okk+1;
} else {
echo "Marksheet -File, optional.
";
}
}
if($okk>1){
echo $echoinfo01;
} else echo ' Fill up the admission form again
';
}
?>