in mijn gastenboek. staat een email check alleen die doet het niet.
hij zegt dat mijn mail adres niet klopt maar hij klopt wel
code waar de email check staat:
code waar je je email adress moet in vullen:
de config. en de lees pagina zijn denk ik niet nodig
hij zegt dat mijn mail adres niet klopt maar hij klopt wel

code waar de email check staat:
[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #FF8000]// ubb.php
// E-mail check[/COLOR]
[COLOR= #007700]function[/COLOR] check_mail[COLOR= #007700]([/COLOR][COLOR= #0000BB]$email[/COLOR][COLOR= #007700])
{[/COLOR]
[URL="http://www.php.net/return"]return[/URL] [URL="http://www.php.net/ereg"]ereg[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"[A-Za-z0-9_-]+([.]{1}[A-Za-z0-9_-]+)*@[A-Za-z0-9-]+([.]{1}[A-Za-z0-9-]+)+"[/COLOR][COLOR= #007700],[/COLOR][COLOR= #0000BB]$email[/COLOR][COLOR= #007700]);
}[/COLOR]
[COLOR= #FF8000]// UBB Algemeen[/COLOR]
[COLOR= #007700]function[/COLOR] ubb_gastenboek[COLOR= #007700]([/COLOR][COLOR= #0000BB]$bericht[/COLOR][COLOR= #007700])
{[/COLOR]
[COLOR= #FF8000]// De smilies (Hier je afbeelding namen bijzetten)[/COLOR]
[COLOR= #0000BB]$bericht[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/str_replace"]str_replace[/URL] [COLOR= #007700]([/COLOR][COLOR= #DD0000]:D[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]<img src="/* afbnaam */">[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$bericht[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$bericht[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/str_replace"]str_replace[/URL] [COLOR= #007700]([/COLOR][COLOR= #DD0000]:P[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]<img src="">[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$bericht[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$bericht[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/str_replace"]str_replace[/URL] [COLOR= #007700]([/COLOR][COLOR= #DD0000]:)[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]<img src="">[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$bericht[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$bericht[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/str_replace"]str_replace[/URL] [COLOR= #007700]([/COLOR][COLOR= #DD0000]:([/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]<img src="">[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$bericht[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$bericht[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/str_replace"]str_replace[/URL] [COLOR= #007700]([/COLOR][COLOR= #DD0000](@[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]<img src="">[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$bericht[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$bericht[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/str_replace"]str_replace[/URL] [COLOR= #007700]([/COLOR][COLOR= #DD0000]:S[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]<img src="">[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$bericht[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$bericht[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/str_replace"]str_replace[/URL] [COLOR= #007700]([/COLOR][COLOR= #DD0000];)[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]<img src="">[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$bericht[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$bericht[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/str_replace"]str_replace[/URL] [COLOR= #007700]([/COLOR][COLOR= #DD0000]:@[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]<img src="">[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$bericht[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #FF8000]// De tekst opmaak[/COLOR]
[COLOR= #0000BB]$bericht[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/str_replace"]str_replace[/URL] [COLOR= #007700]([/COLOR][COLOR= #DD0000][b][/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]<b>[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$bericht[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$bericht[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/str_replace"]str_replace[/URL] [COLOR= #007700]([/COLOR][COLOR= #DD0000][/b][/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]</b>[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$bericht[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$bericht[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/str_replace"]str_replace[/URL] [COLOR= #007700]([/COLOR][COLOR= #DD0000][u][/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]<u>[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$bericht[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$bericht[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/str_replace"]str_replace[/URL] [COLOR= #007700]([/COLOR][COLOR= #DD0000][/u][/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]</u>[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$bericht[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #FF8000]// Een reactie (quote)[/COLOR]
[COLOR= #0000BB]$bericht[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/str_replace"]str_replace[/URL] [COLOR= #007700]([/COLOR][COLOR= #DD0000][quote][/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]<div class="quote">[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$bericht[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$bericht[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/str_replace"]str_replace[/URL] [COLOR= #007700]([/COLOR][COLOR= #DD0000][/quote][/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]</div>[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$bericht[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/return"]return[/URL] [COLOR= #0000BB]$bericht[/COLOR][COLOR= #007700];
}[/COLOR]
?> code waar je je email adress moet in vullen:
[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #FF8000]// Schrijf.php
// Database connectie maken met database[/COLOR]
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]config.php[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #FF8000]// Connectie maken met de ubb pagina voor email check[/COLOR]
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]ubb.php[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #FF8000]// Als er gepost is checken of er niks vergeten is[/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= #FF8000]// Als de naam niet is ingevult[/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]naam[/COLOR][COLOR= #007700]]))
{[/COLOR]
[COLOR= #FF8000]// Error[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]U bent vergeten uw naam in te vullen[/COLOR][COLOR= #007700];
}[/COLOR]
[COLOR= #FF8000]// Anders[/COLOR]
[URL="http://www.php.net/else"]else[/URL]
[COLOR= #007700]{[/COLOR]
[COLOR= #FF8000]// Als de email niet is ingevult[/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]email[/COLOR][COLOR= #007700]]))
{[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]U bent vergeten uw email in te vullen[/COLOR][COLOR= #007700];
}[/COLOR]
[COLOR= #FF8000]// Anders[/COLOR]
[URL="http://www.php.net/else"]else[/URL]
[COLOR= #007700]{[/COLOR]
[COLOR= #FF8000]// Als email niet klopt[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR]check_mail[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]email[/COLOR][COLOR= #007700]]))
{[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]U heeft geen geldige email ingevult[/COLOR][COLOR= #007700];
}[/COLOR]
[COLOR= #FF8000]// Anders[/COLOR]
[URL="http://www.php.net/else"]else[/URL]
[COLOR= #007700]{[/COLOR]
[COLOR= #FF8000]// Als bericht is ingeveult[/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]bericht[/COLOR][COLOR= #007700]]))
{[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]U heeft geen bericht ingevult[/COLOR][COLOR= #007700];
}[/COLOR]
[COLOR= #FF8000]// Anders[/COLOR]
[URL="http://www.php.net/else"]else[/URL]
[COLOR= #007700]{[/COLOR]
[COLOR= #FF8000]// De mysql_query uitvoeren om alles in de db te zetten[/COLOR]
[COLOR= #0000BB]$sql[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"INSERT INTO
gastenboek
(
naam,
email,
bericht,
datum
)
VALUES
(
"[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]naam[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]"
"[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]email[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]"
"[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]bericht[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]"
NOW()
)
"[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #FF8000]// Als de query is gelukt[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$sql[/COLOR][COLOR= #007700])
{[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Uw bericht is geplaatst<br>[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Klik <a href="Lees.php"> hier</a> om naar uw bericht te gaan[/COLOR][COLOR= #007700];
}[/COLOR]
[COLOR= #FF8000]// Anders[/COLOR]
[URL="http://www.php.net/else"]else[/URL]
[COLOR= #007700]{[/COLOR]
[COLOR= #FF8000]// MySql Error opvangen[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Er is een fout opgetreden bij de query: <br />[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]();
}
}
}
}
}
}[/COLOR]
[COLOR= #FF8000]// Anders[/COLOR]
[URL="http://www.php.net/else"]else[/URL]
[COLOR= #007700]{[/COLOR]
[COLOR= #FF8000]// Het formulier[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<form action="" method="post">[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Naam: <input type="text" name="naam"><br>[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]E-mail: <input type="text" name="email"><br>[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Bericht:<br>[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<textarea name="bericht"></textarea>[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<input type="submit" value="Verzenden">[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]</form>[/COLOR][COLOR= #007700];
}[/COLOR]
?> de config. en de lees pagina zijn denk ik niet nodig

Correct me if Im wron!
