Ok, my question is...

Why is it that when i uploaded my files to the server the


wont execute more than once....

But on my Localhost I had no problem with the header refreshing...

Is there a way to stop this from happening or maybe a revise PHP code I can use to let it use header feature????

Thanks in advance for the help.


You can use Javascript inside a php function to control your redirects.



    function redirect($url)
        <script type="text/javascript">
		window.location = "<?php echo $url ?>"

I bet your script has sent some kind of output before it reaches your header command on the server (probably a warning or error message). Try this:

// If no headers are sent, send one
if (!headers_sent()) {
    header("Location: $config_basedir");
} else {
    echo "<pre>Error: Cannot redirect, headers have already been sent.\n";