D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
ksclnmuac
/
www
/
web
/
admin
/
Filename :
nontech.php
back
Copy
<?php $name=$_POST['name']; //echo $name; $fname=$_POST['fname']; $gender=$_POST['gender']; $mobile=$_POST['mobile']; $desig=$_POST['designation']; $quali=$_POST['quali']; $address=$_POST['address']; $file=$_FILES['file']['name']; //echo $file; $tmp_name=$_FILES['file']['tmp_name']; //echo $tmp_name; if($type=='image/jpeg' or $type=='image/png') { $location="staff/"; include("connection.php"); $query="insert into tbl_nonteacher(name,fname,gender,mobile,designation,qualification,address,pic,dor) values('$name','$fname','$gender','$mobile','$desig','$quali','$address','$file',now())"; //echo $query; mysqli_query($dbCon,$query); move_uploaded_file($tmp_name,$location.$file); header("Location:viewnonteacher.php"); } else { echo "<script> window.alert('Pls select correct file type'); window.location.href='addnonteacher.php' </script>"; } ?>