I have a working php page that displays a form. The action is $PHP_SELF, and it checks for 'add' or 'edit' at the top and includes a file that does all the database work. Works great.
So I copied the php file and the two includes, and changed it to look at a different table. It doesn't work, and it doesn't print any error messages or log any
errors. I found a 'debug' class that writes a log file with fopen,fwrite,fflush,fclose, and it doesn't write anything to the log file.
If I move the include so that it's after the call to the function that writes the top of the page, it works great. So the code in the include is probably good.
And the way I'm calling the included code is cloned exactly from tested-good working code.
Are there some functions that just don't work until after the page body has started printing? If so, why doesn't the include fail in the first (working) page?
I've spent way too much time on this; I hope someone has a clue for me...
TIA!