[thelist] if this then this in php

Andrew Maynes andrew at humanbehaviour.co.uk
Mon Jan 6 12:40:00 CST 2003


Could this be used as a solution to overcome browser settings (1024 or 800)?
And instead of declaring an id declare the relative css file 1024.css 800.css?

Andrew

-----Original Message-----
From: thelist-admin at lists.evolt.org
[mailto:thelist-admin at lists.evolt.org]On Behalf Of David Bindel
Sent: Monday, January 06, 2003 18:06
To: thelist at lists.evolt.org
Subject: RE: [thelist] if this then this in php


> Hi all. Having probs trying to serve Win IE5.0 an inline css
> id. All other browsers perform accepatbly, 5.0 is my only problem.
>
> <!--#if expr="$HTTP_USER_AGENT = /MSIE [45]/" -->
> <div id="one">
>   <!--#elif expr="$HTTP_USER_AGENT = /Mozilla\/[56]/" -->
> <div id="two">
>   <!--#else -->
> <div id="two">
>   <!--#endif -->
>
> Something like the above only just for IE5.0 not 5.5, 6+ and
> in php. Can anyone offer some guidance? I've been having this
> problem for sometime now and tried in my php n00b way to fix
> it but no luck. Any help would be greatly appreciated

You can't use SSI and PHP in the same file.  Sorry.

A better way to do it would be just figure out what browser it is using
PHP *instead of* SSI.  I believe that PHP's $_SERVER['HTTP_USER_AGENT']
is the same thing as SSI's $HTTP_USER_AGENT, so try using it instead (in
your PHP script).


HTH,
David Bindel

--
* * Please support the community that supports you.  * *
http://evolt.org/help_support_evolt/

For unsubscribe and other options, including the Tip Harvester
and archives of thelist go to: http://lists.evolt.org
Workers of the Web, evolt !

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.435 / Virus Database: 244 - Release Date: 30/12/2002




More information about the thelist mailing list