Re: EMPTY??

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

 



On 10/23/07, Dan Shirah <mrsquash2@xxxxxxxxx> wrote:
>
> Correct, which is why in my original post I set two variables.
>
> $comments = strtoupper($_POST['comments']); //This is the value I want
> saved
> in my database.
> $check_comments = $_POST['comments']; //This is the value I am using to
> determine if there were any comments entered.



there is no reason to have 2 variables.  just have one variable and
initialize it.

$comment = '';

if(!empty($_POST['comment])) {
   $comment = strtoupper(trim($_POST['comment']));
}

later you can check $comment using empty($comment)
where is the code w/ the statement about the database ?

-nathan

[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