fekaduw Posted February 4, 2007 Share Posted February 4, 2007 hello all, i used the php header function to redirect to another page but unfortunately i got this message: Warning: Cannot modify header information - headers already sent by (output started at C:\webroot\includes\dbconnection.php:25) in C:\webroot\admin\publish.php on line 130 and line 130 contains the following code: header("Location: ".getenv("HTTP_REFERER")); is there any other method to redirect to a page that was displayed before the publish.php page? any help is highly appreciated thanks Quote Link to comment Share on other sites More sharing options...
only one Posted February 4, 2007 Share Posted February 4, 2007 the header(); function has been disabled by your webhost, used to happen to me Quote Link to comment Share on other sites More sharing options...
only one Posted February 4, 2007 Share Posted February 4, 2007 echo this ... <meta http-equiv="refresh" content="0;url=the location"> this doesnt always work the quickest but its all you can do Quote Link to comment Share on other sites More sharing options...
fekaduw Posted February 4, 2007 Author Share Posted February 4, 2007 if the header() function is disabled what is the other alternative? Quote Link to comment Share on other sites More sharing options...
Jessica Posted February 4, 2007 Share Posted February 4, 2007 That is not at all the cause of the problem...read the stickied topic about header errors. The problem is the output of line 25. Quote Link to comment Share on other sites More sharing options...
Cagecrawler Posted February 4, 2007 Share Posted February 4, 2007 I'm not sure that your headers have been disabled, the file dbconnection.php has just already sent them. What's on line 25 of dbconnection.php? If its the end of the file, make sure you have no whitespace after the ?> and also make sure your not outputing anything. EDIT: beaten to it... Quote Link to comment Share on other sites More sharing options...
fekaduw Posted February 4, 2007 Author Share Posted February 4, 2007 hello, thanks a lot it seems to work... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.