[thelist] refresh after unlink function

Brian Cummiskey brian at hondaswap.com
Wed Jan 17 20:43:59 CST 2007

Mark Mckee wrote:
> can anyone shed light on that for me, i am struggling and google and 
> php.net are turning up nothing useful

You cannot use a header after ANY output has been printed to the source,
be it an opening <html> tag or anything else

If you want to do a refresh, you need to do it before you print anything
to the page.
An easy way would be to use a get-style URL on the refresh to pass the
deleted info.


// do the deleteion
header('Location: ' . $_SERVER['PHP_SELF']) . '?removedfile='. $file;?>

or something like that, and then on the top of the script, check for the
passed in paramaters to display properly.

More information about the thelist mailing list