I used echo($notes) at the bottom of the page and the output of $notes prints reardless of whether or not the db field $memberNotes contains any data. It seems to me that $notes is always acting as if $memberNotes always contains data. Is their some way to invoke $notes only if $memberNotes returns any data?
Thanks for your help, ED > -----Original Message----- > From: Jason Wong [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, February 05, 2002 1:22 PM > To: PHP General Mailing List > Subject: Re: [PHP] Easy Question -- Show/ Hide text based on > output of query > > > On Wednesday 06 February 2002 02:14, Edward R. Bailey wrote: > > Please keep the discussion on the list! > > > Thanks for responding! Yes the "memberNotes" database field only > > contains information in about a third of the records so I wanted to > > hide the entire field and label when their was no relevent data. > > > > I made the change you suggested, but the field label does > not show up > > when "memberNotes" contains data. As follows is the current > script. Is > > what what you suggested? > > > > > > <?php If ($memberNotes) { > > $notes = "<div align=\"/left\"/><font > > size=\"/-1\"/><b>Notes:</b></font></div>"; > > } else { > > $notes = "<div align=\"/left\"/><font > > size=\"/-1\"/><b></b></font></div>"; > > } > > ?> > > What are those forward slashes (/) doing in $notes? Try > getting rid of them, > they don't look very HTML to me :) > > Also try echo($notes) OUTSIDE of a <table> construct to see > what it contains. > > > hth > -- > Jason Wong -> Gremlins Associates -> www.gremlins.com.hk > > /* > Q: What do Winnie the Pooh and John the Baptist have in common? > A: The same middle name. > */ > > -- > 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