ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.


AddThis Social Bookmark Button
  User-Friendly Form Validation with PHP and CSS
Subject:   header redirection
Date:   2004-08-24 07:23:41
From:   will_macdonald
I very often find it useful to put exit; after a redirect command. I've had buggy code that sent TWO redirection commands to the browser. Got v confusing.

As mentioned in the PHP manual:


header("Location: http://www.example.com/"); /* Redirect browser */

/* Make sure that code below does not get executed when we redirect. */