user258151
user258151

Reputation:

Using Multiple Images with Favicon

I was wondering whether it was possible to use Favicon in the following manner. I have 2 types of users. Users from Company A and users from Company B. When a company A user logs into the website, I would like them to see Company A's icon/logo in the URL and TAB areas.... However if another user from Company B logs into that same website, they would see Companies B icon/logo.

I am not even sure if this can be done but any help and suggestions would be greatly appreciated.

Upvotes: 1

Views: 184

Answers (1)

Brian McKenna
Brian McKenna

Reputation: 46238

You can supply a favicon by using a link tag in the head. Putting something like the following in the head should work:

<?php
$icon = 'companya.ico';

if($companyb) {
    $icon = 'companyb.ico';
}
?>
<link rel="shortcut icon" type="image/vnd.microsoft.icon" href="<?php echo $icon; ?>" />

Upvotes: 1

Related Questions