ok
Direktori : /proc/thread-self/root/proc/self/root/home/shopnoc1/www/ |
Current File : //proc/thread-self/root/proc/self/root/home/shopnoc1/www/insert.php |
<?php include("db.php"); /** Inserting Data by for Applicants start**/ if (isset($_POST['sub'])) { /** $err=0; $msg=""; **/ $date=$_POST["date"]; $name=$_POST["nm"]; $fname=$_POST["fnm"]; $mname=$_POST["mnm"]; $by=$_POST["birth"]; $divs=$_POST["div"]; $diss=$_POST["dis"]; $gender=$_POST["gen"]; $course=$_POST["course"]; $phone=$_POST["phone"]; /** if($name==""){ $err++; $msg="Please Enter Your Name"; } else if($fname==""){ $err++; $msg="Please Enter Your Father's Name"; } else if($mname==""){ $err++; $msg="Please Enter Your Mother's Name"; } else if($by==""){ $err++; $msg="Please Enter Your Birth Year"; } else if($course==0){ $err++; $msg="Please Select a Course"; } else if($phone==""){ $err++; $msg="Please Enter Phone Number"; } **/ // Database connection $insert = mysqli_query($conn,"insert into studentinfo (date,name,fathername,mothername,birthyear,division,district,gender,course,phone) values ('$date','$name','$fname','$mname','$by','$divs','$diss','$gender','$course','$phone')"); if ($insert) { // code... session_start(); Header( 'Location: register.php'); $_SESSION["message"]="message of success"; } } /** Inserting Data by for Applicants end **/ /** Inserting Data by for Student Admission start**/ if (isset($_POST['adminsub'])) { /** $err=0; $msg=""; **/ $entrydate=$_POST["entrydate"]; $admissiondate=$_POST["admissiondate"]; $stdid=$_POST["stdid"]; $name=$_POST["nm"]; $fname=$_POST["fnm"]; $mname=$_POST["mnm"]; $dob=$_POST["dob"]; $email=$_POST["email"]; $divs=$_POST["div"]; $diss=$_POST["dis"]; $upz=$_POST["upz"]; $gender=$_POST["gen"]; $course=$_POST["course"]; $ctime=$_POST["ctime"]; $phone=$_POST["phone"]; $stdstatus=$_POST["stdstatus"]; $cerstatus=$_POST["cerstatus"]; $docstatus=$_POST["docstatus"]; $cfee=$_POST["cfee"]; $tpay=$_POST["tpay"]; $due=$_POST["due"]; $examstatus=$_POST["examstatus"]; $result=$_POST["result"]; $filename = strtolower($_FILES['file']['name']); $ext=pathinfo($filename,PATHINFO_EXTENSION); $tmp_name = $_FILES['file']['tmp_name']; $target_dir = "images/student/"; $target_file = $target_dir.$stdid.".".$ext; $target_file=strtolower($target_file); move_uploaded_file($_FILES["file"]["tmp_name"],$target_file); /** if ($ext!="jpg" || $ext !="png" || $ext !="jpeg") { echo "file format not supported"; // code... } else{ **/ /** } **/ /** if($name==""){ $err++; $msg="Please Enter Your Name"; } else if($fname==""){ $err++; $msg="Please Enter Your Father's Name"; } else if($mname==""){ $err++; $msg="Please Enter Your Mother's Name"; } else if($by==""){ $err++; $msg="Please Enter Your Birth Year"; } else if($course==0){ $err++; $msg="Please Select a Course"; } else if($phone==""){ $err++; $msg="Please Enter Phone Number"; } **/ $insert = mysqli_query($conn,"insert into admittedstudentinfo (entrydate,admissiondate,stdid,name,fathername,mothername,dob,email,division,district,upazilla,gender,course,classtime,phone,picture,stdstatus,certstatus,docsub,coursefee,totalpayment,due,examstatus,result) values ('$entrydate','$admissiondate','$stdid','$name','$fname','$mname','$dob','$email','$divs','$diss','$upz','$gender','$course','$ctime','$phone','$target_file','$stdstatus','$cerstatus','$docstatus','$cfee','$tpay','$due','$examstatus','$result')"); if ($insert) { // code... session_start(); Header( 'Location: dashboard.php'); $_SESSION["message"]="message of success"; } } /** Inserting Data by for student admission end **/ /** Inserting Notice by for Shopnochra Art IT**/ if (isset($_POST['noticesub'])) { // code... $notice1=$_POST['notice1']; $notice1insert = mysqli_query($conn,"insert into noticeartit (notice) values('$notice1')"); if ($notice1insert) { session_start(); Header( 'Location:dashboard.php'); $_SESSION["message"]="message of success"; } } /** Inserting Data by for student admission end **/ /** Inserting Notice by for Shopnochra Academy**/ if (isset($_POST['noticeacademy'])) { // code... $notice2=$_POST['notice2']; $notice2insert = mysqli_query($conn,"insert into noticeacademy (notice) values('$notice2')"); if ($notice2insert) { session_start(); Header( 'Location:dashboard.php'); $_SESSION["message"]="message of success"; } } /** Inserting Image by for Shopnochra AD**/ if (isset($_POST['adpic'])) { // code... $sid=$_POST['sid']; $filename = strtolower($_FILES['file']['name']); $ext=pathinfo($filename,PATHINFO_EXTENSION); $tmp_name = $_FILES['file']['tmp_name']; $target_dir = "images/ad/"; $target_file = $target_dir.$sid.".".$ext; $target_file=strtolower($target_file); move_uploaded_file($_FILES["file"]["tmp_name"],$target_file); $picinsert = mysqli_query($conn,"insert into adimage (sid,picture) values('$sid','$target_file')"); if ($picinsert) { session_start(); Header( 'Location:dashboard.php'); $_SESSION["message"]="message of success"; } } ?>