my code stock.com

Snippet options

Download: Download snippet as kontaktformular-von-colin.php.
Copy snippet: For this you need a free my code stock.com account.
Embed code : You will find the embed code for this snippet at the end of the page, if you want to embed it into a website or a blog!

</-- HTML SEITEN INHALT -->

<form method="post" action="senden.php">
              <table width="460" border="0" cellspacing="2" cellpadding="2">
                <tr>
                  <td width="140" align="right">Anrede: *</td>
                  <td width="320"><select class="kontaktfeld" name="anrede" id="anrede">
                    <option value="Herr" selected="selected">Herr</option>
                    <option value="Frau">Frau</option>
                  </select></td>
                </tr>
                <tr>
                  <td align="right">Vorname:&nbsp;&nbsp;</td>
                  <td><input class="kontaktfeld" name="vorname" type="text" /></td>
                </tr>
                <tr>
                  <td align="right">Nachname: *</td>
                  <td><input class="kontaktfeld" name="name" type="text" /></td>
                </tr>
                <tr>
                  <td align="right">E-Mail: *</td>
                  <td><input class="kontaktfeld" name="email" type="text" /></td>
                </tr>
                <tr>
                  <td align="right">Telefon:&nbsp;&nbsp;</td>
                  <td><input class="kontaktfeld" name="tel" type="text" /></td>
                </tr>
                <tr>
                  <td align="right">Nachricht: *</td>
                  <td><textarea class="kontaktarea" name="nachricht" id="nachricht" rows="3"></textarea></td>
                </tr>
                <tr>
                  <td align="right">&nbsp;</td>
                  <td><input type="reset" class="kontaktbutton" value="zur&uuml;cksetzen" /> <input class="kontaktbutton" type="submit" value="Absenden" /></td>
                </tr>
              </table>
            </form>

</-- PHP SEITEN INHALT -->

<?PHP

// Pflichtfelder:

		
	if(!$_POST["name"] || empty($_POST["name"])) {
		$error_name = true;
		$error = true;
		}
		
	if(!$_POST["email"] || empty($_POST["email"])) {
		$error_email = true;
		$error = true;		
		}
		
	if(!$_POST["nachricht"] || empty($_POST["nachricht"])) {
		$error_nachricht = true;
		$error = true;		
		}

if($error == true){
	?>
	<div align="center">Fehler<br /><br />
    Folgende Felder sind Pflichfelder:<br /><br />
	<?PHP	
	
	if($error_name == true){
	?>
	Nachname<br />
	<?PHP
	}

	if($error_email == true){
	?>
	E-Mail<br />
	<?PHP
	}
	
	if($error_nachricht == true){
	?>
	Nachricht<br />
	<?PHP
	}
	
	if($error == true){
	?>
    <br /><br />
	<input type="button" value="Zurück" onclick="history.back()">
    <?PHP
	}
	
	?>
	</div>
	<?PHP	
	
	}
	else
    {

?>

Create a free my code stock.com account now.

my code stok.com is a free service, which allows you to save and manage code snippes of any kind and programming language. We provide many advantages for your daily work with code-snippets, also for your teamwork. Give it a try!

Find out more and register now

You can customize the height of iFrame-Codes as needed! You can find more infos in our API Reference for iframe Embeds.