Parse error: parse error, unexpected T_STRING in /path/to/file_named/main.php on line 4
Here is my actual code so you can look at it and see what I am doing something wrong. I know I must be, since I don't see how php could become so popular for site development when it appears to be so difficult to do a simple test and redirect. It works fine in forms such as: <input type="text" name="phrase" size=" <?php if (strstr(getenv("HTTP_USER_AGENT"), "MSIE")) { echo "50"; } else { echo "35"; } ?> " maxlength="50"> But I have yet to be able to do a redirect after a test. index.html is a dhtml splash screen to allow time for image preloading. It does not work on Opera or Konqueror. <? if(strstr($HTTP_USER_AGENT, "Opera")){ header("Location: http://www.servantsmc.com/main.php"); } elseif(strstr($HTTP_USER_AGENT, "Konqueror")){ header("Location: http://www.servantsmc.com/main.php"); } ?> <html> <head> <title>Motorcycle Clubs. Servants For Christ - Northern Colorado</title> <meta name="generator" content="NEdit 5.1"> On Tuesday 17 June 2003 03:26 pm, Ralph wrote: >Oops. Typos. Try this: > if(strstr($HTTP_USER_AGENT, "Mozilla/4")){ > header("Location: http://www.mydomain.com/moz4_page.php"); > } > > elseif(strstr($HTTP_USER_AGENT, "MSIE")){ > header("Location: http://www.mydomain.com/ie_page.php"); > } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php