Basically, I'm coding a database maintenance page for a wargame I'm running online, partially using SMF forums for information.
The code I want to generate should check if the user is currently logged in and if so use those user details to show appropriate content to the specific user.
I know I can just scan the code and find the appropriate part eventually, but if anyone has any experience with this, then advice would be appreciated.
<?php
include("/absolute/forum/path/SSI.php");
if ($context['user']['is_logged'])
echo ' Hi User! ';
if ($context['user']['is_admin'])
echo ' Administration options ';
if ($context['user']['is_guest']) # or !$context[user']['is_logged'] can be used instead..
echo ' You are a guest, please login or register. ';
?>
This is the easier way.
oooh that's perfect..
Thanks for that.