What are some alternative methods to hiding forms from users once a database is full in PHP?

When a database is full, hiding forms from users is a common way to prevent them from submitting data that cannot be stored. One alternative method is to display a message to users informing them that the database is full and cannot accept new entries. Another method is to disable the form submission button so users cannot submit new data until space is available in the database.

<?php
// Check if database is full
if ($databaseIsFull) {
    // Display message to users
    echo "Sorry, the database is currently full and cannot accept new entries.";
} else {
    // Display form for users to submit new data
    echo "<form method='post' action='submit.php'>
              <input type='text' name='data'>
              <input type='submit' value='Submit'>
          </form>";
}
?>