I need to upload a file to a folder based on one of three possible categories
$folder1= “uploads/categoryA/”;
$folder2 = “uploads/categoryB/”;
$folder3 = “uploads/categoryC/”;
with a select I set the categories to the variable
then I upload
if (isset($_POST[‘btn-upload’])) {
if (isset($_FILES[‘file’]))
{ move_uploaded_file($file_loc,$folder1.$final_file); }
this works but I would like the file to be uploaded via $category in the corresponding $folder