You can also use output buffering for some interesting behavior [ http://us3.php.net/manual/en/book.outcontrol.php ]
<?php ob_start() ?> <html> .... </html> <?php if ($success) { header("Location: /success"); } ob_flush_clean() ?> I prefer to set headers at the end of the script because it is at the end of processing a request that you are best able to do content-type negotiation and status based redirection. -- Elijah
_______________________________________________ New York PHP User Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/show_participation.php