environment differences
Posted by: sharmel (---.dhcp.inet.fi)
Date: March 02, 2010 05:36PM

Hi, can anyone help me with this codes? I would like to print different text from different browser using ereg() or preg_match() function.

I have tried like this but doesnt work:

<?php
$moz = $_SERVER['HTTP_USER_AGENT'];

if(ereg("mozila firefox",$moz))
{
echo "this is mozila";
}
else
{
echo " this is MSIE";
}
?>

Options: ReplyQuote


Sorry, only registered users may post in this forum.