Ik heb het volgende scriptje contact.php gemaakt:
<?php
/*
*********************
* contact via email *
*********************
*/
?>
<html>
<head>
<title>Contact</title>
</head>
<body>
<?php
if(isset($submit) && $submit=="Verzend bericht")
{
echo "Naam: " . $gebruiker . "<br>\n";
echo "Organisatie: " . $org . "<br>\n";
echo "E-mail: " . $email . "<br>\n";
echo "Onderwerp: " . $subject . "<br>\n";
echo "Bericht: " . $bericht . "<br>\n";
mail("[email protected]", $subject, $bericht);
}else{
?>
<h1>Neem contact met mij op</h1>
<p class="text">U kunt gebruik maken van mijn contactformulier.</p>
<form name="contactform" method="post" action=<?=$PHP_SELF?>
<div align=left>
<table border="0" width="100%">
<tr>
<td width="11%">Naam</td>
<td width="89%"> <input type=text name=gebruiker size=50></td>
</tr>
<tr>
<td width="11%">Organisatie</td>
<td width="89%"> <input type=text name=org size=30></td>
</tr>
<tr>
<td width="11%">E-mail</td>
<td width="89%"> <input type=text name=email size=25></td>
</tr>
<tr>
<td width="11%">Onderwerp</td>
<td width="89%"> <input type=text name=subject size=25></td>
</tr>
<tr>
<td width="11%">Bericht</td>
<td width="89%"> <textarea name=bericht cols=50 rows=5></textarea></td>
</tr>
</table>
</div>
<p><input type="submit" value="Verzend bericht" name="submit"><input type="reset" value="Alles wissen" name="reset"></p>
</form>
<?
}
?>
</p>
</body>
</html>
Maar ik krijg een fout-melding "Warning: Server Error in contact.php on line 26
"
2.092 views