Ja, hij werkt!!
Ik ben lui, en heb geen zin om elke keer weer naar die website te gaan en in teloggen
Ik ben lui, en heb geen zin om elke keer weer naar die website te gaan en in teloggen


Freestyle schreef:Ik ben lui, en heb geen zin om elke keer weer naar die website te gaan en in teloggenJa, hij werkt!!


[COLOR= #0000BB]<?php[/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]username[/COLOR][COLOR= #007700]]) &&[/COLOR] [URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]password[/COLOR][COLOR= #007700]]) &&[/COLOR] [URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]email[/COLOR][COLOR= #007700]]) &&[/COLOR] [URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]voornaam[/COLOR][COLOR= #007700]]) &&[/COLOR] [URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]achternaam[/COLOR][COLOR= #007700]])){[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Meerdere velden zijn niet ingevuld. Probeer opnieuw."[/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]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]password[/COLOR][COLOR= #007700]])){[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Wachtwoord is verplicht"[/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]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]email[/COLOR][COLOR= #007700]])){[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Email is verplicht"[/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]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]voornaam[/COLOR][COLOR= #007700]])){[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Voornaam is verplicht"[/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]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]achternaam[/COLOR][COLOR= #007700]])){[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Achternaam is verplicht"[/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]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]username[/COLOR][COLOR= #007700]])) {[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Gebruikersnaam is verplicht!"[/COLOR][COLOR= #007700];
}[/COLOR] ?> Bjarnootjuh schreef:Jquery?Mmmm... Is dat echt de enigste manier of is het makkelijker?
Bjarnootjuh schreef:Dat is mijn manier.Mmmm... Is dat echt de enigste manier of is het makkelijker?
Bjarnootjuh schreef:(niet de volledige code is het, voor een voorbeeld).Ik heb nu:[COLOR= #0000BB]<?php[/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]username[/COLOR][COLOR= #007700]]) &&[/COLOR] [URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]password[/COLOR][COLOR= #007700]]) &&[/COLOR] [URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]email[/COLOR][COLOR= #007700]]) &&[/COLOR] [URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]voornaam[/COLOR][COLOR= #007700]]) &&[/COLOR] [URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]achternaam[/COLOR][COLOR= #007700]])){[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Meerdere velden zijn niet ingevuld. Probeer opnieuw."[/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]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]password[/COLOR][COLOR= #007700]])){[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Wachtwoord is verplicht"[/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]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]email[/COLOR][COLOR= #007700]])){[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Email is verplicht"[/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]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]voornaam[/COLOR][COLOR= #007700]])){[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Voornaam is verplicht"[/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]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]achternaam[/COLOR][COLOR= #007700]])){[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Achternaam is verplicht"[/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]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]username[/COLOR][COLOR= #007700]])) {[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Gebruikersnaam is verplicht!"[/COLOR][COLOR= #007700]; }[/COLOR] ?>
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/trim"]trim[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$var[/COLOR][COLOR= #007700])==[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]) {[/COLOR]
?> Aarclay schreef:een dergelijke controle te doen.Beste is om met:[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/trim"]trim[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$var[/COLOR][COLOR= #007700])==[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]) {[/COLOR] ?>
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/trim"]trim[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]username[/COLOR][COLOR= #007700]])==[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]) {[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Error :o[/COLOR]
?>