"BTW - it's an intranet application; security is not a concern."
Yikes! IMHO security should always be a concern. Check out CGI Programming FAQ under Security for some interesting reading. Update: Also merlyn has a great article on the subject of security which I would advise reading.