Heya, Updesigns. Welcome to TSDN!
Simply use a variable to keep track of where you're moving the file and then store that variable's value in your database:
-
$target = '/path/to/new/dir/' . makeSafe($_FILES['inputName']['name']);
-
.
-
.
-
.
-
move_uploaded_file($_FILES['inputName']['tmp_name']), $target);
-
.
-
.
-
.
-
$_sql = "INSERT ... '{$target}' ...";
-
the makeSafe() function above would reference whatever input validation procedure you had defined to make a file path safe (escapes or removes special chars, removes '../', etc.).