|Do you know where your variables are?|
Re: Did I already print a header?by nop (Hermit)
|on Dec 01, 2000 at 00:48 UTC||Need Help??|
Along the lines of using a global, I cram my own flag right into the cgi object.
Yeah, probably not the best idea, as my variable just might clobber some internal CGI variable, but, hey, it works...
So whenever I start a new page, anywhere within my system of cooperating CGI apps, I note the header was sent:
And then in my error code (same code shared by all the scripts in the system), I can see if I need a header or not.
Since this on an intranet, and everyone using the apps is trusted and more-or-less SQL and database savvy, I send lots of info back to the user in the error call. (This would be a really bad idea for a public internet app!!!) Here's my error code:
The marquee tag is annoying, but it gets noticed.
When I trap DBI errors, I send the error routine lots of information to help the user figure out what went wrong, including the sql itself and the DBI error string...
Again, this level of openness is not suitable for open web!