Hi,
You can check to see if there is a url entered before outputting a link like this:
<?php if ($record['ses_url']): ?>
<a href="<?php echo htmlencode($record['ses_url']) ?>" class="captions">Info</a>
<?php endif ?>
For logins, are you using the website membership plugin? If so, you can use a similar method to the above to check to see if a person is logged in. We do this by checking for the $CURRENT_USER variable like this:
<?php if ($CURRENT_USER): ?>
<a href="cdb-stallion-reports.php?title=<?php echo $record['title']; ?>" > <?php echo $reportCount;?> Reports</a>
<?php endif ?>
In addition to this, you should put code on your cdb-stallion-reports.php page that will redirect a user back to a login page if they are not currently logged in. You can do this like this:
if (!$CURRENT_USER) { websiteLogin_redirectToLogin(); }
With the website membership plugin, there is a code generator that will help you to create signup, login, profile, and forgot password pages.
hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/