Uploading an image through the form in this way
$file=$_FILES['image']['tmp_name']; $image= addslashes(file_get_contents($_FILES['image']['tmp_name'])); $image_name= addslashes($_FILES['image']['name']); move_uploaded_file($_FILES["image"]["tmp_name"],"rentgen/userphotos/" . $_FILES["image"]["name"]); $location="rentgen/userphotos/" . $_FILES["image"]["name"]; Can you please tell me how to dynamically rename an image? I read that there is a uniqid function. How can I use this function in this code?
$name = uniqid().'.jpg'; move_uploaded_file($tmp_name, "$uploads_dir/$name");- Vanya Avchyan