0xV3NOMx
Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64



Your IP : 18.222.112.45


Current Path : /var/www/misc/public_html/oums_old/phpscript/
Upload File :
Current File : /var/www/misc/public_html/oums_old/phpscript/employees_photo_upload.php

<?php
	$file_resp="";
	if ( 0 < $_FILES['file']['error'] ) 
	{
		echo 'Error: ' . $_FILES['file']['error'] . '<br>';
		$file_resp="Failed to upload file!";
	}
	else 
	{
		$empl_name = $_POST['text'];
		$file_name = '../img-empl/'.$empl_name." - ".str_replace(' ', '_', $_FILES['file']['name']); // 
		$file_name = strtolower($file_name);
		if(file_exists("$file_name")) unlink("$file_name");
		
		move_uploaded_file($_FILES['file']['tmp_name'], $file_name);
	}	
	echo $file_resp;
?>