For Programmers: Free Programming Magazines  


Home > Archive > PHP DB > March 2004 > Re: [PHP-DB] An if-statement in a "while(list("









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [PHP-DB] An if-statement in a "while(list("
Bruno Ferreira

2004-03-26, 11:12 pm

Henning Olsen wrote:

>I have a search on my page, which presents all the adresses one after all.
>I would like to present a graphic icon representing the mailaddress, but
>only when ther IS a mailaddress. Not everyone has a mail address.
>But I cant put an if-statement in the "while(list(..."
>Any suggestione to me on showing a graphic with a link when $mail is
>different from null?
>
>
>

Build the inside of your loop like this...

print("<p><a href='kontakt/kontakt_edit.php?id=$id'>$navn</a><br>
<small>");

if ( $mail!='' ) then
[print the icon here]
else
echo "<A HREF='mailto:$mail'>$mail</a>";


Bruno Ferreira
---
[This E-mail scanned for viruses by Declude Virus]
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com