How can a PHP script be structured to display a confirmation message after a user has been successfully deleted from a database?

To display a confirmation message after a user has been successfully deleted from a database, you can use a conditional statement to check if the deletion query was successful and then display a message accordingly. You can use a simple HTML structure to display the confirmation message to the user.

<?php
// Your database connection code here

// Check if a user has been deleted successfully
if ($success) {
    echo "<p>User has been successfully deleted.</p>";
} else {
    echo "<p>Failed to delete user.</p>";
}
?>