CasperSecurity

Current Path : /var/www/acasv2.uiet.co.in/v.2.0/api/request/admission/semester/
Upload File :
Current File : /var/www/acasv2.uiet.co.in/v.2.0/api/request/admission/semester/add_semester.php

<?php

	session_start();
	
	include '../../../../web/connection/connection.php';
	
	// semester variables
	$semester_name = $_REQUEST['semester_name'];
	
	// student semester section variables
	$student_semester_id = $_REQUEST['student_semester_id'];
	$student_id = $_REQUEST['student_id'];
	$branch_section_id = $_REQUEST['branch_section_id'];
	$reside_type = $_REQUEST['reside_type'];
	$is_active = 'yes';
	
	
	// inserting data into semester table
        $db_handle = new DBController();
		
		$newInsert = $db_handle->tableinsert("INSERT INTO semester(semester_name)
		VALUES('$semester_name')");
				
		if($newInsert == TRUE){
		  
		  echo 'Data Inserted Successfully in table 1';
		  
		//if insertion is successful in semester table then fetch a particular primary key needed
		$db_handle = new DBController();
		$select = $db_handle->runQuery("SELECT semester_id FROM semester  WHERE semester_name = '$semester_name' ");
		foreach ($select as $v){
			$semester_id = $v['semester_id']; // unique primary key needed as a data for the nested table
		}
	
	// inserting data into student semester section table
	$db_handle = new DBController();
		
		$newInsert2 = $db_handle->tableinsert("INSERT INTO student_semester_section(student_semester_id,student_id,branch_section_id,reside_type,is_active)
		VALUES('$student_semester_id','$student_id','$branch_section_id','$reside_type','$is_active')");
				
		if($newInsert2 == TRUE){
		  
		  echo 'Data Inserted Successfully in table 2';
		  
		}else{
		  
		  echo 'Not Inserted in 2' ;
		  
		}
		
		}else{
		  
		  echo 'Not Inserted in 1' ;
		  
		}
?>
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