How can the code be modified to ensure that a success message is displayed instead of a small white box?

The issue can be resolved by modifying the CSS of the success message container to ensure it is visible and styled appropriately. This can be done by adding CSS properties such as background color, text color, padding, and border to make the success message stand out. Additionally, the PHP code can be updated to display the success message within this styled container.

<?php
if(isset($_POST['submit'])){
    // Form submission code
    
    // Display success message
    echo '<div style="background-color: #d4edda; color: #155724; padding: 10px; border: 1px solid #c3e6cb;">Form submitted successfully!</div>';
}
?>