I want to use this code to upload a image to a folder and I want image to be saved with the give name , not its original name. if the given name is " $imageName " where should i add this variable in this code ? $target_path = $target_path . basename( $_FILES['uploadedfile']['name']); if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) { echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded"; PHP: .
$ImageName = "newname.jpg"; $target_path = $target_path . $ImageName; if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) { echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded"; } PHP: