So I have a form which when submitted executes a php file containing the following redirect.
echo '<meta http-equiv="refresh" content="0;url='.$nexturl.'" />';
As most people will know this isn't a clean/proffesional way of redirecting.
Is it possible to include a file just containing a redirect using header location, however I will require the variable that is created in my process.php file.
For example create using a php include:
<?php include (TEMPLATEPATH . '/redirect.php'); ?>
Then within redirect.php
yes you can redirect (that is: set/reset/unset any header you want) as long as no output happend before
(none, not even whitespace or BOM (utf-8 byte order mark) - iirc)
in case you have output you can capture it via
ob_start and output if afterwards
oddly enough: this is even made quite clear in the doc