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

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jtorral
Forum Newbie
Posts: 8
Joined: Mon Dec 29, 2008 7:49 pm

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

Post 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.
User avatar
AbraCadaver
DevNet Master
Posts: 2572
Joined: Mon Feb 24, 2003 10:12 am
Location: The Republic of Texas
Contact:

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

Post by AbraCadaver »

Code: Select all

header("Location: http://www.icameradb.com");
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.
Post Reply