When are Form Variables Null?

From: Date: Sat, 22 Jun 2002 16:27:05 +0000
Subject: When are Form Variables Null?
Groups: php.general 
Request: Send a blank email to php-general+get-103400@lists.php.net to get a copy of this message
Hi, I've been wondering the behavior of browsers and POST submissions.. basically I'd like to know the behavior of: is_null(), empty(), and isset(). I've found that sometimes when an item is not filled out, the variable is still set on the subsequent page, like $_POST['var'] = ""; What does everyone use to see if forms were submitted correctly? I built my own function: function form_exists($variable) { if (strlen($variable) < 1) { return false; } else { return true; } } It was the only apparent way I could know *for sure* that independent of the browser, I knew what the heck was being submitted. Thoughts? Thanks, Al -- This email was sent with Ximian Evolution.

« previous php.general (#103400) next »