How can the user modify the PHP code to ensure that only the updated date is displayed in the second field?

To ensure that only the updated date is displayed in the second field, the user can modify the PHP code to check if the input field is empty before displaying the updated date. If the input field is not empty, then display the updated date; otherwise, display nothing in the second field.

<?php
$updatedDate = date("Y-m-d H:i:s");
$originalDate = $_POST['original_date'];

if (!empty($originalDate)) {
    echo "<input type='text' name='updated_date' value='$updatedDate'>";
} else {
    echo "<input type='text' name='updated_date' value=''>";
}
?>