php trying to identify netscape as user_agent
| From: | Dusty Cohen | Date: | Mon, 14 Aug 2000 16:06:43 +0000 |
| Subject: | php trying to identify netscape as user_agent | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-11627@lists.php.net to get a copy of this message | ||
Thank you for your help. Acually, that didn't help either, I get the same error. I suspect the problem is that the (what I would call a) variable is not being set, as the message tells me that '$ua is not an object'. Is it referring to the variable as an object? And I can't think of a good reason why it is not being set. Any ideas? Thanks again, I really appreciate it.
Dusty
--------------------------------------
try this...
if ($ua->browser == "Netscape" && $ua->version < 5 ) {
_________________________________________
r a n d y || s e s s e r
http://www.troikawebdesign.com
From: dusty351@hotmail.com ("Dusty Cohen") Newsgroups: php.general Date: 13 Aug 2000 08:18:34 -0700 Subject: [PHP] newbie question, sorry I'm trying to use the script: <?php $ua = get_browser (); if ( ( $ua->browser == "Netscape" ) && ( $ua->version < 5 ) ) { // code to fix the page for netscape :) } ?> which I plucked right out of the documentation on php.net. But all I succeed in recieving is: Warning: $ua is not an object in header.txt on line 9 where line 9 is the line with the if command. I am using php3. Any ideas? Thanks. ________________________________________________________________________Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com