Re: EMPTY??

From: Date: Tue, 23 Oct 2007 18:05:01 +0000
Subject: Re: EMPTY??
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-263568@lists.php.net to get a copy of this message
On 10/23/07, Dan Shirah <mrsquash2@gmail.com> wrote: > > doing a var_dump($_POST['comments']; > > returns string(0) "" > > So the value of $comments in $comments = $_POST['comments']; SHOULD be > equal to 0 or "", right? > > In which case when I do my original: > > if (!empty($comments)) { > echo "Do Something"; > } > > It SHOULD just bypass that and continue with my code, but instead it gives > me the error, "Changed database context to Database." > i think we are missing something; perhaps you can show us the portion of code that contains the string "Changed database context to Database." it seems to me like the echo statement is getting skipped over, otherwise you would see the string "Do Something". since it is getting bypassed, that statement is not getting executed and processing is continuing probly to the point where the string about the database is echoed out. -nathan

« previous php.general (#263568) next »