output buffering error

Discussion in 'PHP' started by askscript, Apr 29, 2010.

  1. #1
    Hi, i believe i did the coding correct but error still shows up. I did follow the instruction to code it. Do you guys know what went wrong with it?
    ---------

    I have followed the instructions to the core but i still get this:


    my header.php and footer.php has the ob_start and ob_end_flush added respectively.

    The login.php is added with this:
    i wonder if there is any other possibilities that the header error message still occurred. i did not see anything wrong but it just couldn't run properly. Any ideas?


    my login.php:


    my header.php:

    my footer.php:
    my welcome.php:
     
    askscript, Apr 29, 2010 IP
  2. bartolay13

    bartolay13 Active Member

    Messages:
    735
    Likes Received:
    14
    Best Answers:
    1
    Trophy Points:
    98
    #2
    saw your error, refer to your login.php

    on the line

    // redirect the user to welcome page
    ob_end_clean(); // Destory the buffer
    header ('Location: welcome.php');
    exit();

    check the lines above of it, header must not be under a html code, put this header above

    print'<h1>Login form</h1><br />

    this one is on line 4
     
    bartolay13, Apr 30, 2010 IP
  3. askscript

    askscript Member

    Messages:
    59
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #3
    hi,

    sorry, i don't get you. My header isn't under any html code. what do you mean by that?

    do you mean the <h1> code?
     
    askscript, Apr 30, 2010 IP