|
Server : LiteSpeed System : Linux terra.hostitbro.com 5.14.0-611.54.3.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May 7 16:31:24 EDT 2026 x86_64 User : outerorb ( 1091) PHP Version : 8.1.34 Disable Function : mail Directory : /home2/outerorb/dev.outerorbittech.com/bhive/ | |
|
Path: /home2/outerorb/dev.outerorbittech.com/bhive/form_action.php
Size: 3.73 KB
Permissions: 0644
<?php require_once("connection.php");
if(isset($_POST['form_submit']))
{
$name=trim($_POST['name']);
$mobile=trim($_POST['mobile']);
$email=trim($_POST['email']);
$aadhar=trim($_POST['aadhar']);
$fname=trim($_POST['fname']);
$address=trim($_POST['address']);
$pin=trim($_POST['pin']);
$state=trim($_POST['state']);
$city=trim($_POST['city']);
$age=trim($_POST['age']);
$relocate=trim($_POST['relocate']);
$education=trim($_POST['education']);
$institute=trim($_POST['institute']);
$university=trim($_POST['university']);
$pass=trim($_POST['pass']);
$result=trim($_POST['result']);
$night=trim($_POST['night']);
$work=trim($_POST['work']);
$epf=trim($_POST['epf']);
$fcertificate=trim($_POST['fcertificate']);
$emp=trim($_POST['emp']);
$date=date("Y-m-d");
$reg_no='BD'.rand(99,10).time();
$folder = "uploads/";
//Photo
/*
$image_file=$_FILES['image']['name'];
$file = $_FILES['image']['tmp_name'];
$path = $folder . $image_file;
$target_file=$folder.basename($image_file);
$file_name_array = explode(".", $image_file);
$extension = end($file_name_array);
$new_image_name = 'photo_'.rand() . '.' . $extension;
*/
//Sign
$simage_file=$_FILES['simage']['name'];
$sfile = $_FILES['simage']['tmp_name'];
$spath = $folder . $simage_file;
$starget_file=$folder.basename($simage_file);
$file_name_array = explode(".", $simage_file);
$extension = end($file_name_array);
$snew_image_name = 'Doc_'.rand() . '.' . $extension;
/*if($file!='')
{
move_uploaded_file($file, $folder . $new_image_name);
}*/
if($sfile!='')
{
move_uploaded_file($sfile, $folder . $snew_image_name);
}
$sql="INSERT into aplicant(reg_no,name,mobile,email,aadhar,fname,address,pin,state,city,age,relocate,education,institute,university,pass,result,night,work,epf,fcertificate,emp,biodata,date)
VALUES(:reg_no,:name,:mobile,:email,:aadhar,:fname,:address,:pin,:state,:city,:age,:relocate,:education,:institute,:university,:pass,:result,:night,:work,:epf,:fcertificate,:emp,:biodata,:date)";
$stmt = $db->prepare($sql);
$stmt->bindParam(':reg_no', $reg_no, PDO::PARAM_STR);
$stmt->bindParam(':name', $name, PDO::PARAM_STR);
$stmt->bindParam(':mobile', $mobile, PDO::PARAM_STR);
$stmt->bindParam(':email', $email, PDO::PARAM_STR);
$stmt->bindParam(':aadhar', $aadhar, PDO::PARAM_STR);
$stmt->bindParam(':fname', $fname, PDO::PARAM_STR);
$stmt->bindParam(':address', $address, PDO::PARAM_STR);
$stmt->bindParam(':pin', $pin, PDO::PARAM_STR);
$stmt->bindParam(':state', $state, PDO::PARAM_STR);
$stmt->bindParam(':city', $city, PDO::PARAM_STR);
$stmt->bindParam(':age', $age, PDO::PARAM_STR);
$stmt->bindParam(':relocate', $relocate, PDO::PARAM_STR);
$stmt->bindParam(':education', $education, PDO::PARAM_STR);
$stmt->bindParam(':institute', $institute, PDO::PARAM_STR);
$stmt->bindParam(':university', $university, PDO::PARAM_STR);
$stmt->bindParam(':pass', $pass, PDO::PARAM_STR);
$stmt->bindParam(':result', $result, PDO::PARAM_STR);
$stmt->bindParam(':night', $night, PDO::PARAM_STR);
$stmt->bindParam(':work', $work, PDO::PARAM_STR);
$stmt->bindParam(':epf', $epf, PDO::PARAM_STR);
$stmt->bindParam(':fcertificate', $fcertificate, PDO::PARAM_STR);
$stmt->bindParam(':emp', $emp, PDO::PARAM_STR);
$stmt->bindParam(':biodata', $snew_image_name, PDO::PARAM_STR);
$stmt->bindParam(':date', $date, PDO::PARAM_STR);
$stmt->execute();
$last_id = $db->lastInsertId();
if($last_id!='')
{
header("location:adpreview.php?id=".$reg_no);
}
else
{
echo 'Something went wrong';
}
}
?>