Re: [PHP] Re: Determine whether $_GET has a value

2004-06-28 Thread Justin Patrin
On Thu, 24 Jun 2004 21:53:21 -0400, Al <[EMAIL PROTECTED]> wrote: > > You need to be specific about what you consider to be a legitimate value > for your application. > > consider: > > $var= $_GET['myname']; > > if((preg_match("/([0-9]|[a-z]|[A-Z]/", $var)) { Do something } First, you have an

Re: [PHP] Re: Determine whether $_GET has a value

2004-06-24 Thread Chris Shiflett
--- Anguz <[EMAIL PROTECTED]> wrote: > Wouldn't this work? > >if(isset($_GET['var']) && !empty($_GET['var'])){ > // do something... >} No, he mentioned that he considers 0 to be acceptable, and this will fail the empty() test. Chris = Chris Shiflett - http://shiflett.org/ PHP