<?php
include dirname(__DIR__).'/header.phtml';
?>    



<h2>Ihre Anfrage an uns</h2>
<form method="post">

<?php foreach ($labels as $index => $value) {
    echo '<label for="' . $index . '">' . $value . '</label>';
    if ($index == "content") {
        echo "<textarea id=\"$index\" name=\"$index\" >";
        if (isset($validData[$index])) { echo $validData[$index]; } 
        echo "</textarea><br>"; 
    } else {
        echo '<input type="text" name="' . $index . '" value="' . (isset($validData[$index]) ? $validData[$index] : '') . '"><br>';
    }
    if (isset($errors[$index])) {
        echo '<label class="errorMsg">' . $errors[$index] . '</label><br>';  
    } 
}

?>
    
    
        
    
    
   

<input type="hidden" name="controller" value="contact">       
<input type="hidden" name="do" value="validateForm">
<input type="submit" name="submit" value="Absenden"></form>

<?php include dirname(__DIR__).'/footer.phtml'; ?>