The redirect must happen instead of the header (as it's basically a special HTTP header), which means that you can't call it after you've printed the CGI header. The easy way to fix it in your script is move the call to submit_parameters just before the cgi->header line.
Dr. Michael K. Neylon - mneylon-pm@masemware.com
||
"You've left the lens cap of your mind on again, Pinky" - The Brain