champoi Posted November 27, 2008 Share Posted November 27, 2008 i have a download list using this script: $file=$_POST[$_GET['download']]; header("Content-type: application/force-download"); header("Content-Transfer-Encoding: Binary"); header("Content-length: ".filesize($file)); header("Content-disposition: attachment; filename=\"".basename($file)."\""); readfile($file); after the user clicks a download link, i want to reload the page and show what the user has already downloaded by changing the background of the link. But the problem is the reload every after a download click, i tried placing a javascript reload but didnt work, the page just stops without reloading, same when redirecting using javascript, i tried using php header, like this: $file=$_POST[$_GET['download']]; header("Content-type: application/force-download"); header("Content-Transfer-Encoding: Binary"); header("Content-length: ".filesize($file)); header("Content-disposition: attachment; filename=\"".basename($file)."\""); readfile($file); header("Location: ?option=sapli&user=".$_SESSION['uname'].""); but it reloads first before the download even starts, any comments and suggestions? Link to comment https://forums.phpfreaks.com/topic/134527-reload-problem-after-download-script/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.