On Sat, 2003-02-15 at 09:01, Malcolm wrote: > Hello, > > I've been fooling with this for a few days now. > I'm getting a hearders already sent error. > I know it means I've got output before the header but > I can't figure how else to do this.
Hi Malcom-- Looks like you are outputting data right after your script starts (on line to, you have an echo right away). You should either (a) turn on output buffering, which should take care of the problem, or (b) (the best solution because it makes your script behave the way it should) move things around so that the decision on the redirect is made before outputting anything. Try adding this at the beginning, before the echo: if ($dog == 'mal') header ('Location: ../aamaillist/ml_menu.php'); Hope this helps! Marco -- ---------------- php|architect - The Monthly Magazine for PHP Professionals Come check us out on the web at http://www.phparch.com! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php