CasperSecurity

Current Path : /var/www/mvc360.ucnms.co.in/v.2.0/api/request/hostel/hostel_room/
Upload File :
Current File : /var/www/mvc360.ucnms.co.in/v.2.0/api/request/hostel/hostel_room/add_new_hostel_room.php

<?php

		session_start();
	
	include'../../../../../connection/connection.php';
	$connection = new createConnection();
	$connection->connect();
	
		//$hostel_id = $_REQUEST['hostel_id'];
		//$floor_id = $_REQUEST['floor_id'];
		
		$hostel_name = $_REQUEST['hostel_name'];
		$floor = $_REQUEST['floor'];
		
		$room_no = $_REQUEST['room_no'];
		$occupancy = $_REQUEST['occupancy'];
		
		$date = date('Y-m-d');
	    $userId = $_SESSION['userId'];
	    $is_active = 'yes';
		

		
		
		
	$select ="SELECT * FROM class WHERE host_room_no = '$room_no' AND is_active = 'yes'";
	$query = mysqli_query($connection->myconn, $select);
	$num=mysqli_num_rows($query);    
		
if($num >= 1)
		
		 {
			 $_SESSION['ERROR_MSG'] = "Room No Already Exist";
			 $_SESSION['MSG_ALRT'] = "FALSE";
			header('location:Hostel_Room.php');
	
  
		 }
		 else{
	$newInsert ="INSERT INTO hostel_room(host_room_no,occupancy,created_on,created_by,is_active)
		VALUES('$room_no','$occupancy','$date','".(int)$userId."','$is_active')";
				    
	if(mysqli_query($connection->myconn,$newInsert) === TRUE ){
	$_SESSION['ERROR_MSG'] = "Data Inserted Successfully";
		$_SESSION['MSG_ALRT'] = "TRUE";
		//header('location:../../../../web/home/modules/university/Library/itemtype/item_type.php');
		header('location:Hostel_Room.php');
	
		
	
	} else {
		$_SESSION['ERROR_MSG'] = "Unsuccess";
		$_SESSION['MSG_ALRT'] = "FALSE";
		//header('location:../../../../web/home/modules/university/Library/itemtype/item_type.php');
	header('location:Hostel_Room.php');
	}
		 }
	
?>
Hacker Blog, Shell İndir, Sql İnjection, XSS Attacks, LFI Attacks, Social Hacking, Exploit Bot, Proxy Tools, Web Shell, PHP Shell, Alfa Shell İndir, Hacking Training Set, DDoS Script, Denial Of Service, Botnet, RFI Attacks, Encryption
Telegram @BIBIL_0DAY