Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #7730

Re: Simpler way to validate form fields?

From "M. Strobel" <sorry_no_mail_here@nowhere.dee>
Newsgroups comp.lang.php
Subject Re: Simpler way to validate form fields?
Date 2012-12-05 12:49 +0100
Message-ID <ai8qm2F7hr9U1@mid.uni-berlin.de> (permalink)
References <2lusb8ldn2g35j7p025r8ep45i5g1gkat2@4ax.com> <k9m37q$2gl$1@dont-email.me>

Show all headers | View raw


Am 05.12.2012 01:07, schrieb Jerry Stuckle:
> In most cases I prefer isset() over empty - an array element may be set but may not
> contain data.  Those can be two different errors.

Same here. I think you should always use isset() in the first place, because clean
code does not access unset variables.

And if empty() is allowed depends on the case at hand.

/Str.

Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Simpler way to validate form fields? Gilles <nospam@nospam.com> - 2012-12-04 23:37 +0100
  Re: Simpler way to validate form fields? "Beauregard T. Shagnasty" <a.nony.mous@example.invalid> - 2012-12-04 23:44 +0000
    Re: Simpler way to validate form fields? Jerry Stuckle <jstucklex@attglobal.net> - 2012-12-04 19:04 -0500
  Re: Simpler way to validate form fields? Jerry Stuckle <jstucklex@attglobal.net> - 2012-12-04 19:07 -0500
    Re: Simpler way to validate form fields? Gilles <nospam@nospam.com> - 2012-12-05 11:32 +0100
    Re: Simpler way to validate form fields? "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-12-05 12:49 +0100
  Re: Simpler way to validate form fields? "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-12-05 10:56 +0100
    Re: Simpler way to validate form fields? Gilles <nospam@nospam.com> - 2012-12-05 11:36 +0100
      Re: Simpler way to validate form fields? "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-12-05 11:52 +0100
      Re: Simpler way to validate form fields? "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-12-05 12:09 +0100
        Re: Simpler way to validate form fields? Gilles <nospam@nospam.com> - 2012-12-06 14:43 +0100
          Re: Simpler way to validate form fields? Gilles <nospam@nospam.com> - 2012-12-06 14:55 +0100
            Re: Simpler way to validate form fields? "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-12-06 17:50 +0100
              Re: Simpler way to validate form fields? Gilles <nospam@nospam.com> - 2012-12-06 17:51 +0100
            Re: Simpler way to validate form fields? Gilles <nospam@nospam.com> - 2012-12-06 17:50 +0100
              Re: Simpler way to validate form fields? "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-12-06 17:55 +0100
                Re: Simpler way to validate form fields? Gilles <nospam@nospam.com> - 2012-12-07 11:15 +0100
                Re: Simpler way to validate form fields? "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-12-07 11:56 +0100

csiph-web