[PHP] Re: Comparrison

2002-03-27 Thread Steve Clay

Ron,

You probably want strstr().  or stristr().
Just as a usability recommendation on you code below, please don't restrict your pages
to IE only..  This would be better:

if (!strstr($HTTP_USER_AGENT,"MSIE 5.5") {
  print "Please note this page has functionality designed for IE5.5";
}

Users of perfectly good browsers like Mozilla, Opera, and IE5/mac won't be
locked out.

Steve

Wednesday, March 27, 2002, 7:46:12 AM, Ron wrote:
R> How would I compare to variables where I would want one variable to equal
R> only part or some of the other variable?
R> Here is the code

R>  if ($HTTP_USER_AGENT !== "%MSIE 5.5%") {
R>  print "You must upgrade your browser";
R> } else {
R>  exit;
R> }

?>>

R> Any suggestions



-- 
[EMAIL PROTECTED] ** http://mrclay.org


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Comparrison

2002-03-27 Thread Adrian Ciutureanu

http://php.net/ereg

"Ron" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> How would I compare to variables where I would want one variable to equal
> only part or some of the other variable?
> Here is the code
>
>  if ($HTTP_USER_AGENT !== "%MSIE 5.5%") {
>  print "You must upgrade your browser";
> } else {
>  exit;
> }
>
> ?>
>
> Any suggestions
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php