Re: [PHP-DB] checking for empty array from a form field? grrrrrrrrrrr!

2003-02-05 Thread Mark
First try isset($product) to see if it's being POSTed or GETted properly. You might need to use $_POST['products'] or $_GET['products']. --- Aaron Wolski [EMAIL PROTECTED] wrote: Argh HOW does one check for an array being empty from a form field?? Tried a billion

RE: [PHP-DB] checking for empty array from a form field? grrrrrrrrrrr!

2003-02-05 Thread Hutchins, Richard
What about: count($arrayname) Should tell you how many items are in an array. -Original Message- From: Aaron Wolski [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 05, 2003 4:04 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] checking for empty array from a form field?

Re: [PHP-DB] checking for empty array from a form field?grrrrrrrrrrr!

2003-02-05 Thread Mignon Hunter
I usually use: while(list($key,$value) = each($products)) { echo $key:$value; } On Wed, 2003-02-05 at 15:03, Aaron Wolski wrote: Argh HOW does one check for an array being empty from a form field?? Tried a billion different things and NOTHING works

RE: [PHP-DB] checking for empty array from a form field? grrrrrrrrrrr!

2003-02-05 Thread Aaron Wolski
that the option value= is empty! Any more ideas?? *sigh* Aaron -Original Message- From: Hutchins, Richard [mailto:[EMAIL PROTECTED]] Sent: February 5, 2003 4:03 PM To: 'Aaron Wolski'; [EMAIL PROTECTED] Subject: RE: [PHP-DB] checking for empty array from a form field? grrr

RE: [PHP-DB] checking for empty array from a form field? grrrrrrrrrrr!

2003-02-05 Thread jay
PROTECTED]] Sent: February 5, 2003 4:03 PM To: 'Aaron Wolski'; [EMAIL PROTECTED] Subject: RE: [PHP-DB] checking for empty array from a form field? grrr! What about: count($arrayname) Should tell you how many items are in an array. -Original Message- From: Aaron Wolski

RE: [PHP-DB] checking for empty array from a form field? grrrrrrrrrrr!

2003-02-05 Thread Hutchins, Richard
]] Sent: Wednesday, February 05, 2003 4:53 PM To: 'Hutchins, Richard'; [EMAIL PROTECTED] Subject: RE: [PHP-DB] checking for empty array from a form field? grrr! Ok... well When I select the select product which has a option value= it tells me the count is one (1). If I select

RE: [PHP-DB] checking for empty array from a form field? grrrrrrrrrrr!

2003-02-05 Thread Aaron Wolski
: Hutchins, Richard [mailto:[EMAIL PROTECTED]] Sent: February 5, 2003 4:53 PM To: [EMAIL PROTECTED] Subject: RE: [PHP-DB] checking for empty array from a form field? grrr! Somebody else replied with isset($varname). Try that. The count() function is working as expected (see http

Re: [PHP-DB] checking for empty array from a form field? grrrrrrrrrrr!

2003-02-05 Thread Jeff Pauls
try : if (strlen($products) == 0) { echo nothing entered in field; } http://www.php.net/manual/en/function.strlen.php Jeff - Original Message - From: Aaron Wolski [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, February 05, 2003 3:03 PM Subject: [PHP-DB] checking for