I am having the strangest problem.
I have a php page that I am using to accept file upload.
the script to do this is on a page called upload.php
for some reason if i upload the files, everything will work fine
except the header("location:$url"); at the end.
or it seemingly not works... i mean by this that i get a "This page cannot be displayed error" but if i hit F5 for refresh it will take me to the next page.
i tried debugging the old fashioned way, stripping away everything
until i came down to this...
for my upload form.
<form enctype="multipart/form-data" action="upload.php" method=post>
<input type="hidden" name="action" value="addfile">
<input type="file" name="uf[]"><br>
<input type="file" name="uf[]"><br>
<input type="submit" class="submit" value="upload file(s)"><br>
</form>
here is the only code i have on upload.php
<?php
header("location:
http://www.yahoo.com");
?>
If i remove the input type="file" from the form... the redirect works fine, like this:
<form enctype="multipart/form-data" action="upload.php" method=post>
<input type="hidden" name="action" value="addfile">
<input type="submit" class="submit" value="upload file(s)"><br>
</form>
obviously this is useless.
for some reason the act of passing the input "type=file" into the upload page makes the header function act retarded.
Whats worse is, i have a similar function , working elsewhere on the same server!!
but ive stripped this code down to so little... and it still doesnt work...
anyone know a sure fire way to make the header work everytime?