This topic is locked
[SOLVED]

 diferent logo in header dependent of user

2/28/2011 1:02:57 PM
PHPRunner General questions
C
cis2131 author

I am trying to place a different logo in the header dependent of the user that logs in.
I have made a field in the user table, that holds the name og picture, but how do i lookup the fields and $SESSION variables from the header?
Claus

Sergey Kornilov admin 2/28/2011

Something like this will work:

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

{

echo "<img src='images/admin_logo.png'>";

}
C
cis2131 author 2/28/2011



Something like this will work:

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

{

echo "<img src='images/admin_logo.png'>";

}



Thanks, but where do i put the code?

Sergey Kornilov admin 2/28/2011

Add this code to header.php file. (<project directory>\visual\header.php)

<?php
if ($_SESSION["UserID"]=="admin")

{

echo "<img src='images/admin_logo.png'>";

}
?>