Re: isset question

From: Date: Thu, 18 Jun 2009 19:07:09 +0000
Subject: Re: isset question
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-294283@lists.php.net to get a copy of this message
2009/6/18 Gary <gwpaul@ptd.net>: > I have a form that gives the submitter a choice or either one set of > questions, or another. I am still getting the message even if the input was > left blank.  So on the line below, > > $msg.=  isset($_POST['mort']) ? "The mortgage amount is  $mort\n" : > " "; > > I get > > The mortgage amount is > > What am I missing here? A variable "isset" even if it's empty. Either compare it to an empty string or test the result from strlen against 0. -Stuart -- http://stut.net/

« previous php.general (#294283) next »