Re: EMPTY??

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux