Forums

PHP

This topic is locked

only show link for detail if fields are not null

Posted 10 Jul 2003 07:34:04
1
has voted
10 Jul 2003 07:34:04 mike p posted:
Hard to put this in words. Setting up a go to detail page turns a certain varible into a link that leads to a more detailed table for that user or record. Is it possible to have only some of the variables displayed as a link by checking if certain fields for that user are null? It might be easier to look at the page in question

www.newbiebootkamp.com/update/members.php.

Eventually some users will have a detail page and some wont. Instead of having a link that leads to an empty table for some users, I would like to set up a conditional statement saying that the screenname should only be displayed as a link if certain fields for that user are not null. Is that possible?

Replies

Replied 10 Jul 2003 07:35:48
10 Jul 2003 07:35:48 mike p replied:
tke period out of that link www.newbiebootkamp.com/update/members.php
Replied 12 Jul 2003 21:01:54
12 Jul 2003 21:01:54 Dean Blackborough replied:
Very easy to do with an IF statement.

<?php if ($row['column'] != NULL): ?>Put here the code for your active detail link
<?php elseif: ?>Put here what to do if table column is null, just echo the name
<?php endif; ?>

Or something along those line, hope this helps.

--------------------------------------
www.galleryof3d.com
(PHP and MySQL)

Reply to this topic