HTTP_USER_AGENT error
Posted: Wed Jul 02, 2014 7:56 am
[text]Undefined index: HTTP_USER_AGENT[/text]
It's warming me about this code. It is simply coming from a browser or computer that doesn't report back what browser "agent" it is??
Is there a way to avoid this error?
It's warming me about this code. It is simply coming from a browser or computer that doesn't report back what browser "agent" it is??
Is there a way to avoid this error?
Code: Select all
if (($count % 4) == 0)
{
if (strpos($_SERVER['HTTP_USER_AGENT'],'Firefox')!==FALSE) {
echo "<div style='clear: both;' /><br/><img src='images/divider.png' /></div>";}
elseif (strpos($_SERVER['HTTP_USER_AGENT'],'Safari')!==FALSE) {
echo "<div style='clear: both;' /><br/><img src='images/divider.png' /></div>";}
elseif (strpos($_SERVER['HTTP_USER_AGENT'],'MSIE')!==FALSE) {
echo "<div style='clear: both;' /><br/><img src='images/divider_ie.png' /></div>";}
else { echo "<div style='clear: both;' /><br/><img src='images/divider_nogap.png' /></div>";}
}