Er zit een fout in het contactscript dat ik gebruik.
Ookal vul je een bericht in, hij zegt: Geen bericht ingevuld.
Voorbeeld: http://www.eftelrijk.nl/contact.php
Ookal vul je een bericht in, hij zegt: Geen bericht ingevuld.
Voorbeeld: http://www.eftelrijk.nl/contact.php
[COLOR= #0000BB]<?[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR] [COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REQUEST_METHOD[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]POST[/COLOR][COLOR= #007700])
{[/COLOR]
[COLOR= #0000BB]$aError[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/array"]array[/URL][COLOR= #007700]();[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]sNaam[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]""[/COLOR] [COLOR= #007700])
{[/COLOR]
[COLOR= #0000BB]$aError[/COLOR][COLOR= #007700][] =[/COLOR] [COLOR= #DD0000]"U heeft uw naam niet ingevuld!"[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]sMail[/COLOR][COLOR= #007700]]) || ![/COLOR][URL="http://www.php.net/eregi"]eregi[/URL] [COLOR= #007700]([/COLOR] [COLOR= #DD0000]@[/COLOR][COLOR= #007700],[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]sMail[/COLOR][COLOR= #007700]] ) || ![/COLOR][URL="http://www.php.net/eregi"]eregi[/URL] [COLOR= #007700]([/COLOR] [COLOR= #DD0000].[/COLOR][COLOR= #007700],[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]sMail[/COLOR][COLOR= #007700]] ) ||[/COLOR] [URL="http://www.php.net/eregi"]eregi[/URL] [COLOR= #007700]([/COLOR] [COLOR= #DD0000] [/COLOR][COLOR= #007700],[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]sMail[/COLOR][COLOR= #007700]] ) )
{[/COLOR]
[COLOR= #0000BB]$aError[/COLOR][COLOR= #007700][] =[/COLOR] [COLOR= #DD0000]Uw heeft uw emailadres niet ingevult![/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]comment[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]""[/COLOR] [COLOR= #007700])
{[/COLOR]
[COLOR= #0000BB]$aError[/COLOR][COLOR= #007700][] =[/COLOR] [COLOR= #DD0000]"U heeft geen bericht ingevuld!"[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR] [URL="http://www.php.net/count"]count[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$aError[/COLOR][COLOR= #007700]) ==[/COLOR] [COLOR= #0000BB]0[/COLOR] [COLOR= #007700])
{[/COLOR]
[COLOR= #0000BB]$sBricht[/COLOR] [COLOR= #007700]=[/COLOR] htmlspecialchars [COLOR= #007700]([/COLOR] [URL="http://www.php.net/addslashes"]addslashes[/URL] [COLOR= #007700]([/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]sComment[/COLOR][COLOR= #007700]] ) );[/COLOR]
[URL="http://www.php.net/mail"]mail[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"EMAILADRESWEGGEHAALD"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"Contact Formulier Eftelrijk"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$sBericht[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Uw bericht is verzonden. We zullen hier zo spoedig mogelijk op reageren. Bedankt!"[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/else"]else[/URL]
[COLOR= #007700]{[/COLOR]
[URL="http://www.php.net/for"]for[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$i[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #0000BB]$i[/COLOR] [COLOR= #007700]<[/COLOR] [URL="http://www.php.net/count"]count[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$aError[/COLOR][COLOR= #007700]);[/COLOR] [COLOR= #0000BB]$i[/COLOR][COLOR= #007700]++)
{[/COLOR]
?>
<table class="tekst">
<tr>
<td>
<?=$aError[$i];?>
</td>
</tr>
</table>
[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #007700]}
}
}[/COLOR]
[URL="http://www.php.net/else"]else[/URL]
[COLOR= #007700]{[/COLOR]
?>
<table width="100%" border="0">
<form name="form" method="post">
<tr>
<td width="20%">Naam:</td>
<td width="80%"><input type="text" name="sNaam" size="30"></td>
</tr>
<tr>
<td width="20%">E-Mail:</td>
<td width="80%"><input type="text" name="sMail" size="30"></td>
</tr>
<tr>
<td width="20%">Uw bericht: </td>
<td width="80%"><textarea name="sComment" rows="4" cols="30"></textarea></td>
</tr>
<tr>
<td width="100%" colspan="2"><input type="reset" value="Wis"> <input type="submit" name="submit" value="Verzend"></td>
</tr>
</form>
</table>
[COLOR= #0000BB]<?[/COLOR]
[COLOR= #007700]}[/COLOR]
?> 