I'm trying to pass a variable (actually several environmental variables, but just testing with one that's already been defined).
I've checked my host's version of php (via phpinfo() - 4.3.10) and 'register_globals' is ON for both the local & master.
My redirect code and variable definition looks like:
Code: Select all
<?php
function inAgent($agent) {
global $HTTP_USER_AGENT;
$notAgent = strpos($HTTP_USER_AGENT,$agent) === false;
return !$notAgent; }
if ( inAgent('MSIE') ) { $browser = 'ie'; } ?>
<?php if ($browser == 'ie'): ?>
<?php header("Location: http://mysite.com/_errors/404ie.php"); ?>
<?php else: ?>
<html>I've tried a bunch of things:
Code: Select all
<?php echo $browser;
printf ('$browser');
echo $_GETїbrowser];No errors, but none result in an output of "ie" to the screen.
Are the variables being passed? How do I fetch them in the 404ie.php file?
TIA