Hi all,
Over the last week or two i have been working on uploading images to mysql db,
Whilst i have the image uploading to the correct location and the name of the image added to the database, i cant understand how to add the image location to the name also,
I have the following code that uploads & names the image as of the date time of upload, but I would like to add the location also to the database so I can call it back later.
// Image upload process start
$image_ext = explode('.', $image); //split the image name with respect of " . "
$image_name = date('Ymdhis') . "." . $image_ext[1]; //create unique image name with present "date & time"
$dest = "uploaded/" . $image_name; //set the destination path (where image file will be uploaded)
$val = move_uploaded_file($_FILES['profile_image']['tmp_name'], $dest); //upload image to the destination path
// Image upload process end
many thanks