Jump to content

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


jtorral

Recommended Posts

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.

 

 

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.

If the above suggestions do not work, chances are your script is erroring out before it hits the header call. Make sure error reporting is set to E_ALL and display errors is turned on for development so you can actively see the error and debug properly.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.