mirror of
https://github.com/itflow-org/itflow
synced 2026-03-04 12:54:51 +00:00
Fix expense file uploads always showing even though nothing got uploaded
This commit is contained in:
2
post.php
2
post.php
@@ -340,7 +340,7 @@ if(isset($_POST['add_expense'])){
|
|||||||
$category = intval($_POST['category']);
|
$category = intval($_POST['category']);
|
||||||
$description = strip_tags(mysqli_real_escape_string($mysqli,$_POST['description']));
|
$description = strip_tags(mysqli_real_escape_string($mysqli,$_POST['description']));
|
||||||
|
|
||||||
if(!empty($_FILES['file'])){
|
if($_FILES['file']['tmp_name']!='') {
|
||||||
$path = "uploads/expenses/$vendor/";
|
$path = "uploads/expenses/$vendor/";
|
||||||
$path = $path . basename( $_FILES['file']['name']);
|
$path = $path . basename( $_FILES['file']['name']);
|
||||||
$file_name = basename($path);
|
$file_name = basename($path);
|
||||||
|
|||||||
Reference in New Issue
Block a user