CasperSecurity

Current Path : /var/www/acasv2.uiet.co.in/v.2.0/api/request/academic/section/
Upload File :
Current File : /var/www/acasv2.uiet.co.in/v.2.0/api/request/academic/section/add_new_section.php

<?php

	session_start();
	
	include'../../../../../connection/connection.php';
	$connection = new createConnection();
	$connection->connect();
	
	
	$section_code = $_REQUEST['section_code'];
	$section_name = $_REQUEST['section_name'];
	$date = date('Y-m-d');
	$userId = $_SESSION['userId'];
	$is_active = 'yes';
	
    $select ="SELECT * FROM class WHERE section_name = '$section_name' AND is_active = 'yes'";
	$query = mysqli_query($connection->myconn, $select);
	$num=mysqli_num_rows($query);    
		
if($num >= 1)
		
		 {
			 $_SESSION['ERROR_MSG'] = "Section Name Already Exist";
			 $_SESSION['MSG_ALRT'] = "FALSE";
			header('location:section.php');
	
  
		 }
		 else{
	$newInsert ="INSERT INTO section(section_code,section_name,created_on,created_by,is_active)
		VALUES('$section_code','$section_name','$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:section.php');
	
		
	
	} else {
		$_SESSION['ERROR_MSG'] = "Unsuccess";
		$_SESSION['MSG_ALRT'] = "FALSE";
		//header('location:../../../../web/home/modules/university/Library/itemtype/item_type.php');
	header('location:section.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