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

    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"){

    }else{
    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
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    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.
    ||||If you are getting paid to do a job, don't ask for help on it!||||


  •  

    Posting Permissions

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