CasperSecurity

Current Path : /var/www/devatraket.uiet.co.in/devatraket/v1.0/api/request/asset_unit/
Upload File :
Current File : /var/www/devatraket.uiet.co.in/devatraket/v1.0/api/request/asset_unit/asset_unit_insert_api.php

<?php
   
session_start();


include '../../connection/connection.php';

$unit_code = $_REQUEST['unitcode'];
$unit_name= $_REQUEST['unitname'];
$location_id= $_REQUEST['location_id'];

$user_id = '1';
$date = date("Y-m-d");
$is_active = 'yes';

if(!empty($unit_code)){
			


$db_handle = new DBController();
$check = $db_handle->numRows("SELECT * FROM asset_unit WHERE asset_unit_code = '$unit_code'");

// Retrieve the new id from your form



// Set the MySQL query to run which will update  table

if($check >= '1'){
	$_SESSION['ERROR_MSG'] = "Asset Unit Already Exist";
		  $_SESSION['MSG_ALRT'] = "FALSE";
		 header('location:../../../web/home/modules/setup/assetunit/assetunitgrid.php');	
	}else{

		$db_handle = new DBController();
		$newInsert = $db_handle->tableinsert("INSERT INTO asset_unit (asset_unit_code,asset_unit_name,location_id,created_on,created_by,is_active) 
		VALUES ('$unit_code','$unit_name','$location_id','$date','$user_id','$is_active')");
		if($newInsert == TRUE){ 
			$_SESSION['ERROR_MSG'] = "Success";
		  $_SESSION['MSG_ALRT'] = "TRUE";
		  header('location:../../../web/home/modules/setup/assetunit/assetunitgrid.php');		
		}else{
			 $_SESSION['ERROR_MSG'] = "Unsuccess";
		  $_SESSION['MSG_ALRT'] = "FALSE";
		 header('location:../../../web/home/modules/setup/assetunit/assetunitgrid.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