Posted by Rik on 02/08/07 14:51
Vincent Delporte <justask@acme.com> wrote:
> On Thu, 08 Feb 2007 13:48:42 +0100, Vincent Delporte
> <justask@acme.com> wrote:
>> //BAD if(!$login or !$password) {
>> //BAD if(empty($login) or empty($password)) {
>
> This doesn't work either:
>
> //BAD if(is_null($login) or is_null($password)) {
What's wrong with the following:
if(empty($_POST['login']) || empty($_POST['password']){
echo 'one of the two isn\'t set';
} else {
echo 'both entered';
}
--
Rik Wasmus
Navigation:
[Reply to this message]
|