Jump to content

i can not redirect...


fekaduw

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/37071-i-can-not-redirect/
Share on other sites

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...

Link to comment
https://forums.phpfreaks.com/topic/37071-i-can-not-redirect/#findComment-177062
Share on other sites

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.