MMCT TEAM
Server IP : 86.38.243.193  /  Your IP : 216.73.217.143
Web Server : LiteSpeed
System : Linux in-mum-web1336.main-hosting.eu 4.18.0-553.34.1.lve.el8.x86_64 #1 SMP Thu Jan 9 16:30:32 UTC 2025 x86_64
User : u493057690 ( 493057690)
PHP Version : 8.2.30
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : OFF  |  Python : ON
Directory (0755) :  /home/u493057690/domains/iasfindia.com/public_html/admin/../assets/../

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/u493057690/domains/iasfindia.com/public_html/admin/../assets/../add_query_reserve_member.php
<?php
	require_once 'admin/connect.php';
	if(ISSET($_POST['add_registration1'])){
		$sql = "Select serial_id from member_registration order by serial_id desc limit 1";
	$run = mysqli_query($conn,$sql);
	if(mysqli_num_rows($run) > 0){
		$row = mysqli_fetch_array($run);
		$serial_id = $row['serial_id'];
		$serial_id = ++$serial_id;
	}
	else{
		$serial_id = "IASF/NG/MEM/01";
	}
	
		$name = $_POST['name'];
		$father_name = $_POST['father_name'];
		$dob = $_POST['dob'];
		$address = $_POST['address'];
		$contact_no = (int)$_POST['contact_no'];
		$emailid = $_POST['emailid'];
		$state = $_POST['state'];
		$district = $_POST['district'];
		$country = $_POST['country'];
		$qualification = $_POST['qualification'];
		$adhar_no = (int)$_POST['adhar_no'];
		$reg_date = $_POST['reg_date'];
		
		$uploadedfile="uploadedfile1" ;
    	$file_type = $_FILES[$uploadedfile]['type']; 
		$file_name = $_FILES[$uploadedfile]['name'];
		$file_name= str_replace(" ","_",$file_name);
		if($file_name!="")
		{
        	$file_ext = strtolower(substr($file_name,strrpos($file_name,"."))); 
	    	$FILE_MIMES = array('application/rtf','application/doc','application/pdf','image/jpeg','image/jpg','image/gif','image/png','image/tiff','image/bmp'); 
	    	$FILE_EXTS = array('.rtf','.docx','.doc','.pdf','.jpeg','.jpg','.JPG','.gif','.GIF','.png','.PNG','.tiff','.TIFF','.bmp','.BMP'); 

        		if (!in_array($file_type, $FILE_MIMES) && !in_array($file_ext, $FILE_EXTS) ) 
				{
					echo "Sorry, $file_name($file_type) is not allowed to be uploaded.";
					exit();
				}
	 
				$target_path="files/";
				if(is_dir("files/".strtotime("now")))
				{
					$t_path=strtotime("now");
					$target_path =$target_path.$t_path;	
					$target_path =$target_path."/";
					$target_path = $target_path . $file_name;
				}
				else
				{
					mkdir(("files/".strtotime("now")),0777, true);
					$t_path=strtotime("now");
					$target_path =$target_path.$t_path;	
					$target_path =$target_path."/";
					$target_path = $target_path . $file_name;
				}
		
				$_FILES[$uploadedfile]['tmp_name']; 
				if(move_uploaded_file($_FILES[$uploadedfile]['tmp_name'], $target_path))
				{
					$f_name=$target_path;
				}
		}
		else
		{
			$f_name="null";
		}
		
		
		
		$uploadedfile2="uploadedfile2" ;
    	$file_type = $_FILES[$uploadedfile2]['type']; 
		$file_name = $_FILES[$uploadedfile2]['name'];
		$file_name= str_replace(" ","_",$file_name);
		if($file_name!="")
		{
        	$file_ext = strtolower(substr($file_name,strrpos($file_name,"."))); 
	    	$FILE_MIMES = array('application/rtf','application/doc','application/pdf','image/jpeg','image/jpg','image/gif','image/png','image/tiff','image/bmp'); 
	    	$FILE_EXTS = array('.rtf','.docx','.doc','.pdf','.jpeg','.jpg','.JPG','.gif','.GIF','.png','.PNG','.tiff','.TIFF','.bmp','.BMP'); 

        		if (!in_array($file_type, $FILE_MIMES) && !in_array($file_ext, $FILE_EXTS) ) 
				{
					echo "Sorry, $file_name($file_type) is not allowed to be uploaded.";
					exit();
				}
	 
				$target_path="files/";
				if(is_dir("files/".strtotime("now")))
				{
					$t_path=strtotime("now");
					$target_path =$target_path.$t_path;	
					$target_path =$target_path."/";
					$target_path = $target_path . $file_name;
				}
				else
				{
					mkdir(("files/".strtotime("now")),0777, true);
					$t_path=strtotime("now");
					$target_path =$target_path.$t_path;	
					$target_path =$target_path."/";
					$target_path = $target_path . $file_name;
				}
		
				$_FILES[$uploadedfile2]['tmp_name']; 
				if(move_uploaded_file($_FILES[$uploadedfile2]['tmp_name'], $target_path))
				{
					$f_name1=$target_path;
				}
		}
		else
		{
			$f_name1="null";
		}
		
		$uploadedfile3="uploadedfile3" ;
    	$file_type = $_FILES[$uploadedfile3]['type']; 
		$file_name = $_FILES[$uploadedfile3]['name'];
		$file_name= str_replace(" ","_",$file_name);
		if($file_name!="")
		{
        	$file_ext = strtolower(substr($file_name,strrpos($file_name,"."))); 
	    	$FILE_MIMES = array('application/rtf','application/doc','application/pdf','image/jpeg','image/jpg','image/gif','image/png','image/tiff','image/bmp'); 
	    	$FILE_EXTS = array('.rtf','.docx','.doc','.pdf','.jpeg','.jpg','.JPG','.gif','.GIF','.png','.PNG','.tiff','.TIFF','.bmp','.BMP'); 

        		if (!in_array($file_type, $FILE_MIMES) && !in_array($file_ext, $FILE_EXTS) ) 
				{
					echo "Sorry, $file_name($file_type) is not allowed to be uploaded.";
					exit();
				}
	 
				$target_path="files/";
				if(is_dir("files/".strtotime("now")))
				{
					$t_path=strtotime("now");
					$target_path =$target_path.$t_path;	
					$target_path =$target_path."/";
					$target_path = $target_path . $file_name;
				}
				else
				{
					mkdir(("files/".strtotime("now")),0777, true);
					$t_path=strtotime("now");
					$target_path =$target_path.$t_path;	
					$target_path =$target_path."/";
					$target_path = $target_path . $file_name;
				}
		
				$_FILES[$uploadedfile3]['tmp_name']; 
				if(move_uploaded_file($_FILES[$uploadedfile3]['tmp_name'], $target_path))
				{
					$f_name2=$target_path;
				}
		}
		else
		{
			$f_name2="null";
		}
		
		
		
		
		
		 $sql = "INSERT INTO `member_registration` (serial_id, name, father_name, dob, address, state, district, country, contact_no, emailid, qualification, adhar_no, photo, adhar_card, signature, reg_date, status) VALUES('$serial_id', '$name', '$father_name', '$dob', '$address', '$state', '$district', '$country', '$contact_no', '$emailid', '$qualification', '$adhar_no', '$f_name', '$f_name1', '$f_name2', '$reg_date', 'Pending')";
			 mysqli_query($conn,$sql);
			 
			 echo "<script>alert(\"Registration Successfully\")</script>";
echo "<script> window.location=\"thank-you.php\"</script>";
	
	}
		?>

MMCT - 2023