Re: EMPTY??

From: Date: Wed, 24 Oct 2007 00:23:02 +0000
Subject: Re: EMPTY??
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-263586@lists.php.net to get a copy of this message
I then submit my page and on the following page I put the posted value into two variables. $comments = strtoupper($_POST['comments']); $check_comments = $_POST['comments']; I made two variables for the same posted value because I believe empty() does not work with strtoupper in front of the value. It only works with a standalone variable, correct? So, once I have assigned my comments to a variable I am doing: if(!empty($check_comments)) { echo "Do Something"; }
Try: $comments = isset($_POST['comments']) ? $_POST['comments'] : null; if ($comment == null) { echo 'do something'; } else { echo 'do something else'; } Cheers, tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.com

« previous php.general (#263586) next »