Jump to content

Recommended Posts

I was having a problem with Internet Exploder (big surprise, right?) displaying my drop down menus improperly. I found a solution that works ... I have a PHP file that I place as an include on all my pages and the drop down menus, on IE, are cool.

 

But my problem, at present, is this:

I need to have that PHP Include (for IE) loaded, in place of my regular PHP Include (for all the other browsers), when some one is using the IE browser.

 

Is there a way to write an "If IE" conditional statement for a PHP Include?

 

Thanks for your help!

 

Alan

Link to comment
https://forums.phpfreaks.com/topic/178127-php-include-wif-ie-condition-statement/
Share on other sites

I found one that works.

 

This goes into "index.php" (and *nothing* else):

 

<?php

if (eregi("MSIE", $_SERVER['HTTP_USER_AGENT']))

  { $location = 'http://somesite.com/index_ie.php';

    header ("location: $location");

    exit();

  } else {

    $otherlocation = 'http://somesite.com/index_allothers.php';

    header ("location: $otherlocation");

    exit();

  }

?>

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.