PHP - Lesson 3 (November 28th, 2007)
Posted on November 28, 2007 by Roman
PowerPoint slides and examples all in one archive.
Filed under: PHP Class, Resources, Web Application Development | Tagged: class, database, php, sql
PowerPoint slides and examples all in one archive.
Filed under: PHP Class, Resources, Web Application Development | Tagged: class, database, php, sql
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?
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.
Ok, cool. Thanks!