Page 1 of 1

Arg!!! I am going crazy with header function !!

Posted: Thu Apr 08, 2010 2:16 pm
by jtorral
What in tarnation is going on here? This is driving me NUTS !!!!!! None

This code is in between some other code. Whatever I do, it still does not redirect using header or javascript. What am I missing here?????

FYI, I have output_buffering turned on in my php configuration file.

the function mymonitor just return the num rows returned from a query. Everything works except the redirect. I have header commented out because I was also trying a java redirect.

Code: Select all

if ( isset($_REQUEST['reset']) ) {
$reset = $_REQUEST['reset'];
if( mymonitor($reset) == 0 ) {
error_message("You cannot edit a monitor you do not own");
}
resetsendmessages($reset);
resetattempts($reset);
resetnotified($reset);
//header("Location http://www.icameradb.com");
?>
<script language="JavaScript" type="text/javascript">
<!-- window.location.href = "http://www.icameradb.com" //-->
</script>
<?
}
Thanks for looking.

Re: Arg!!! I am going crazy with header function !!

Posted: Thu Apr 08, 2010 2:42 pm
by AbraCadaver

Code: Select all

header("Location: http://www.icameradb.com");