Thank you. This worked well.
John
On Fri, 1 Mar 2002, Richard Baskett wrote:
> This is a simple solution and it should work and you'll probably kick
> yourself when you hear it *grin* Use:
>
> <textarea rows=8 cols=50 name=open_why_good_consult><?echo
> $open_why_good_consult?></textarea>
>
> Put it all on one line, because the way you have it currently there are
> white spaces in the textarea and a newline so it's always going to be FALSE
> when testing to see if it's empty.
>
> Cheers!
>
> Rick
>
> "And God shall wipe away all tears from their eyes; and there shall be no
> more death, neither sorrow, nor crying, neither shall there be any more
> pain: for the former things are passed away." - Revelation 21:4
>
>
> > From: John Fulton <[EMAIL PROTECTED]>
> > Date: Fri, 1 Mar 2002 11:45:07 -0500 (EST)
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] empty() & texarea
> >
> >
> > I can't seem to get empty() to check if someone has left
> > a textarea unanswered in an online form with code like
> > the following:
> >
> > <textarea rows=8 cols=50 name=open_why_good_consult>
> > <?echo $open_why_good_consult?>
> > </textarea>
> >
> > if(empty($open_why_good_consult)) {
> > print "Please fill in why you would be a good consultant";
> > }
> >
> >
> > Any ideas? It seems to work for things like this:
> >
> > <input type=text name=user_name size=8 value="<?echo $user_name?>">
> >
> > if empty($user_name) {
> > print "Please fill in a username";
> > }
> >
> > I suppose it is because the variable is not getting posted. Is
> > there a way to post the variable?
> >
> > Thanks.
> >
> > John
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php