How can the error message "Undefined index: thema" in line 21 be addressed in PHP 7?

The error message "Undefined index: thema" in line 21 indicates that the array key 'thema' is not defined in the array being accessed. To address this issue in PHP 7, you can use the isset() function to check if the key exists before accessing it to avoid the error.

// Check if the key 'thema' exists before accessing it
if(isset($_POST['thema'])) {
    $thema = $_POST['thema'];
    // Use $thema variable as needed
} else {
    // Handle the case when 'thema' key is not set
}