I've run into this problem many times before under numerous conditions. While print $query->header; how can you redirect the user to another page without the use of any external language such as java? I tried print "Location: $user\n"; but rather than directing the user it literally prints that on the browser.