From eb48349c2ddfb775e48ec4a6bd68fec23ab9e753 Mon Sep 17 00:00:00 2001 From: Aman Dhakad <37514170+amandhakad@users.noreply.github.com> Date: Wed, 15 May 2019 10:14:44 +0530 Subject: [PATCH] Undefined Bugs fix! Also removed mysql error trigger due to undefined variable. So check mysql error in seperate line! --- ajax/ajax_php_file.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ajax/ajax_php_file.php b/ajax/ajax_php_file.php index b42d25d..526ed67 100644 --- a/ajax/ajax_php_file.php +++ b/ajax/ajax_php_file.php @@ -18,7 +18,7 @@ // replace $host,$username,$password,$dbname with real info $dbh=mysqli_connect($host,$username,$password,$dbname); - mysqli_query($dbh,"INSERT INTO `files` (filename,path) VALUES ('".$_FILES['uploaded_file']['tmp_name']."','".$file_path."')") or trigger_error($link->error."[ $sql]"); + mysqli_query($dbh,"INSERT INTO `files` (filename,path) VALUES ('".$_FILES['file']['tmp_name']."','".$targetPath."')"); mysqli_close($dbh); echo "Image Uploaded Successfully...!!
";