Oops. There was an extra period at the end there (after PHP_SELF).
<?php
if ($HTTP_POST_VARS['submit'] == "submit") {
then upload the file...
header("Location: http://".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']");
}
?>
On the threshold of genius, Jed Verity wrote:
> Hi, Roland,
>
> There might be a better way to do this, but you could try to use the
> header() function after your upload takes place to redirect the browser to
> the same page, using GET. Something like...
>
> <?php
> if ($HTTP_POST_VARS['submit'] == "submit") {
> then upload the file...
> header("Location: http://".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'].");
> }
> ?>
>
> Or something like that. HTH,
> Jed
>
> On the threshold of genius, Roland Swingler wrote:
>
>> Hi
>>
>> I have a problem with caching on IE 5.1.4 on Mac Os X. (PHP 4.0.5)
>>
>> The page I want to use is a simple file upload page that works by:
>>
>> <?php
>> if ($HTTP_POST_VARS['submit'] == "submit") {
>> then upload the file...
>> }
>> ?>
>> Rest of document.
>>
>> The form action returns to the same page (to allow you to upload another
>> file).
>>
>> This works fine, but if you press the refresh btn, the file keeps uploading
>> pictures. If you click in the address bar & press return, this does not
>> happen.
>>
>> I have included the http headers to prevent caching as described in the
>> documentation, but this hasn't seemed to work.
>>
>> Is this a quirk of the browser/os combination or is there something i'm
>> missing.
>>
>> TIA
>>
>> Roland
>>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php