in reply to Re^2: Hacker Proofing My First Script
in thread Hacker Proofing My First Script
Yes that is secure. Still a bit ugly, but secure nonethless. Why declare $sth at the top, miles from where you use it? Why collect the return codes in $rc - you don't *do* anything with them? It is much more convenient to put constants like your DB passwd etc at the top so you can find them.
You have a bug. The $q->redirect header will never be acted upon as you terminate the headers with your Content-Type header. You don't need that header, just the redirect. Also print $q->header() will give you a valid header so if you are using CGI why not use it. <code>
cheers
tachyon
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Hacker Proofing My First Script
by awohld (Hermit) on Oct 04, 2004 at 06:05 UTC | |
by tachyon (Chancellor) on Oct 04, 2004 at 07:08 UTC |