Ik heb een form wat gegevens verzend maar hij doet het niet. Hij verwerkt de gegevens niet. Ik denk dat de fout bij de controle zit of alles goed is ingevuld, maar ik kan hem zelf niet vinden.
Code:Alvast bedankt.
Code:
Spoiler tonen
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]verzend[/COLOR][COLOR= #007700]]))
{[/COLOR]
[COLOR= #0000BB]$naam[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR]htmlentities[COLOR= #007700]([/COLOR][URL="http://www.php.net/addslashes"]addslashes[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]naam[/COLOR][COLOR= #007700]])));[/COLOR]
[COLOR= #0000BB]$email[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR]htmlentities[COLOR= #007700]([/COLOR][URL="http://www.php.net/addslashes"]addslashes[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]email[/COLOR][COLOR= #007700]])));[/COLOR]
[COLOR= #0000BB]$bericht[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR]htmlentities[COLOR= #007700]([/COLOR][URL="http://www.php.net/addslashes"]addslashes[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]bericht[/COLOR][COLOR= #007700]])));[/COLOR]
[COLOR= #0000BB]$error[/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][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$naam[/COLOR][COLOR= #007700])) {[/COLOR]
[COLOR= #0000BB]$error[/COLOR][COLOR= #007700][] =[/COLOR] [COLOR= #DD0000]U heeft geen naam ingevuld![/COLOR][COLOR= #007700];
}[/COLOR] [URL="http://www.php.net/elseif"]elseif[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$email[/COLOR][COLOR= #007700])) {[/COLOR]
[COLOR= #0000BB]$error[/COLOR][COLOR= #007700][] =[/COLOR] [COLOR= #DD0000]U heeft geen email address ingevuld![/COLOR][COLOR= #007700];
}[/COLOR] [URL="http://www.php.net/elseif"]elseif[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$bericht[/COLOR][COLOR= #007700])) {[/COLOR]
[COLOR= #0000BB]$error[/COLOR][COLOR= #007700][] =[/COLOR] [COLOR= #DD0000]U heeft geen bericht ingevoerd![/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/elseif"]elseif[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/strlen"]strlen[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$naam[/COLOR] [COLOR= #007700]>[/COLOR] [COLOR= #0000BB]2[/COLOR][COLOR= #007700])) {[/COLOR]
[COLOR= #0000BB]$error[/COLOR][COLOR= #007700][] =[/COLOR] [COLOR= #DD0000]U naam moet minimaal 3 karakters bevatten![/COLOR][COLOR= #007700];
}[/COLOR] [URL="http://www.php.net/elseif"]elseif[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/strlen"]strlen[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$bericht[/COLOR] [COLOR= #007700]>[/COLOR] [COLOR= #0000BB]5[/COLOR][COLOR= #007700]) &&[/COLOR] [URL="http://www.php.net/strlen"]strlen[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$bericht[/COLOR] [COLOR= #007700]<[/COLOR] [COLOR= #0000BB]500[/COLOR][COLOR= #007700])) {[/COLOR]
[COLOR= #0000BB]$error[/COLOR][COLOR= #007700][] =[/COLOR] [COLOR= #DD0000]Het bericht moet minimaal 5karakters hebben en maximaal 500![/COLOR][COLOR= #007700];
}[/COLOR] [URL="http://www.php.net/elseif"]elseif[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/count"]count[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$error[/COLOR] [COLOR= #007700]>[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700])) {[/COLOR]
[URL="http://www.php.net/foreach"]foreach[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$error[/COLOR] [COLOR= #007700]as[/COLOR] [COLOR= #0000BB]$fout[/COLOR][COLOR= #007700])
{[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<p style="color:#ff0000;">[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$fout[/COLOR] [COLOR= #007700].[/COLOR][COLOR= #DD0000]<br />[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Klik <a href="contact.php">hier</a> om het nog een keer te proberen[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]</p>[/COLOR][COLOR= #007700];
}
}[/COLOR]
[URL="http://www.php.net/else"]else[/URL]
[COLOR= #007700]{[/COLOR]
[COLOR= #0000BB]$iets[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]iets[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<p style="color:#009900">[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]succes vol verstuurd! <br />[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Klik <a href="index.php">hier</a> om naar de home page te gaan[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]</p>[/COLOR][COLOR= #007700];
}
}[/COLOR]
?>