How can PHP developers retrieve and display the original file path of an uploaded image for user reference or tracking purposes?

When users upload images to a website, PHP developers may want to retrieve and display the original file path of the uploaded image for user reference or tracking purposes. To achieve this, developers can store the original file path in a database or session variable when the image is uploaded, and then retrieve and display it when needed.

// Store the original file path when the image is uploaded
$original_file_path = $_FILES['image']['tmp_name'];

// Save $original_file_path to database or session variable

// Retrieve and display the original file path
echo "Original File Path: " . $original_file_path;