PHP - Lesson 3 (November 28th, 2007)

PowerPoint slides and examples all in one archive.

3 Responses to “PHP - Lesson 3 (November 28th, 2007)”

  1. I’m receiving a warning after editing or deleting a record:
    Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\aptana\header.php:14) in C:\xampp\htdocs\aptana\edit.php on line 17

    Apparently it’s caused by whitespace, but there doesn’t seem to be any in the header file.
    Any ideas?

  2. For some reason I cannot reproduce this error on my machine. I think XAMPP may be using another instance of PHP that I have on my machine.

    Either way, I am pretty sure this error is caused by the leading output from header.php file. This can be easily fixed by adding ob_start(); as a first line of PHP code in header.php file. This will enable output buffering, which means that PHP will not produce any output until the page execution is finished.

  3. Ok, cool. Thanks!

Leave a Reply