This topic is locked

Dynamic Headers

8/6/2010 6:59:51 AM
PHPRunner General questions
S
swanside author

Is it possible to have a header that contains information depending on who has logged in?
My idea is that three different users will login with diferent company names, so in the header file it would have {$CompanyName_value}?

A
ann 8/6/2010

Hi,
you need to check who is logged in user in the Before Display event on the Events tab.

Then add html code of the header to the page according to the user name.

Here is just a sample:

$meta="<p align='center'><img src='include/logo.jpg' border='0'></p>";

if ($_SESSION["UserID"]=='admin'){

echo $meta;

}