Hi,
I use the script below to rename the uploaded image files. THe script works fine but I would like to use as filename the product_id taken from my recordset.
When I try to use $row_prod['prod_id'] which is the value that returns my id in the $rename variable , i get a renamed file without name but just an extension ( .jpg)
The script:
$rename = "Anything";
$old_name = $_FILES['Image']['name'];
$read_extension = explode(".", $old_name);
$ext = $read_extension[1];
$new_name = $rename.".".$ext;
rename("images/prod/".$old_name, "images/prod/".$new_name);
Any ideas??? 🙁