Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1

    Header location messing up

    I am trying to do a header location.. but it is messing up .. it is giving me the following error

    PHP Code:
    Cannot modify header information headers already sent by (output started at /home/content/i/n/n/****/html/***/connect2.php:19
    I am using the following code
    PHP Code:
    if($_SERVER['HTTP_REFERER'] =="http://profileawareness.com/forums"){

    header("location: http://profileawareness.com/denied.html");

    And it is giving an error in an included file (connect2.php), which all that has is some simple mysql querys (only 7 lines of code)
    Last edited by TrainReq; 06-04-2007 at 04:51 AM.

  2. #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    In a place far, far away...
    Thanked 1,043 Times in 1,019 Posts
    Nothing can be outputted to the browser before a header is used unless you have output buffering turned on which probably isn't the best solution. Post the code for connect2.php leaving out your passwords and user names.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts