I am looking to modify my code below to accept a randomly generated unique id to replace the name using php uniqid function. I have tried a couple ways with no success.
move_uploaded_file($_FILES["file"]["tmp_name"],
"upload/" . $_FILES["file"]["name"]);
$ipath = "upload/";
$ipath .= $_FILES["file"]["name"];
Does anyone know how I can accomplish this?
Edit: I am asking where to put the uniqid function so that the file is stored with the uniqid.extension in the folder on my server.
or, if you want to keep the file extension:
\\edit: to use the $ipath variable…