header("Content- Length: ".filesize($ filename) ); you forgot to put quotation mark on variable ($filename), you should put something like this ("$filename").. message me if i 'm wrong.. --- On Fri, 31/10/08, Muhammad Sohail Khan <sohail_meet@xxxxxxxxxxx> wrote: From: Muhammad Sohail Khan <sohail_meet@xxxxxxxxxxx> Subject: RE: File - PHPClassesFeatureRequests.txt To: php-objects@xxxxxxxxxxxxxxx Date: Friday, 31 October, 2008, 1:43 AM Hi Sana, Sory for late response. Here is the code. just copy it and change the file name. nothing else. //__________ _________ _________ _________ ______ <?php if (isset($_POST[ 'skDownload' ])) { $filename = 'sohail_cv.doc' ; header("Pragma: public"); // required header("Expires: 0"); header("Cache- Control: must-revalidate, post-check=0, pre-check=0" ); header("Cache- Control: private",false) ; // required for certain browsers header("Content- Type: application/ msword"); // change, added quotes to allow spaces in filenames, by Rajkumar Singh header("Content- Disposition: attachment; filename=\"" .basename( $filename) ."\";" ); header("Content- Transfer- Encoding: binary"); header("Content- Length: ".filesize($ filename) ); readfile("$filename "); exit(); } else { echo "<form name='frm1' method='post' > <input type='submit' name='skDownload' value='Download Me'> </form>"; } ?> You can test it live here... http://www.zoajmake rs.com/downloadM e.php //__________ _________ _________ _________ ______ cheer up :) Muhammad Sohail Khan Software Engineer Cell: +92 333 575 9991 To: php-objects@ yahoogroups. com From: sanalmgr47@yahoo. com Date: Thu, 30 Oct 2008 09:03:38 -0700 Subject: Re: File - PHPClassesFeatureRe quests.txt hello all, im facing the problem in making a download link behind a button.what should be the code? A link also doesn't work behind the button to go back to the page mentioned in link. Please Help Me. SanaAlamgeer --- On Wed, 10/29/08, Sana Alamgeer <sanalmgr47@yahoo. com> wrote: From: Sana Alamgeer <sanalmgr47@yahoo. com> Subject: Re: File - PHPClassesFeatureRe quests.txt To: php-objects@ yahoogroups. com Date: Wednesday, October 29, 2008, 5:30 PM hello all, im facing the problem in making a download link behind a button.what should be the sode? A link also doesn't work behind the button. Please Help Me. SanaAlamgeer --- On Sun, 10/19/08, php-objects@ yahoogroups. com <php-objects@ yahoogroups. com> wrote: From: php-objects@ yahoogroups. com <php-objects@ yahoogroups. com> Subject: File - PHPClassesFeatureRe quests.txt To: php-objects@ yahoogroups. com Date: Sunday, October 19, 2008, 11:39 AM Hello, This is just a reminder messages to let you know as subscriber of the php-objects mailing list you may be interested about the new site where you may submit new feature requests or bug reports about the PHP Classes. The site URL is http://bugs. phpclasses. org/ . If you would like to keep track or discuss the feature requests or bug reports, you can join the PHP Classes Bugs mailing list by either sending an empty message to phpclasses-bugs- subscribe@ yahoogroups. com or by accessing the list page at: http://groups. yahoo.com/ group/phpclasses -bugs Manuel Lemos moderator of php-objects list [Non-text portions of this message have been removed] [Non-text portions of this message have been removed] ____________ _________ _________ _________ _________ _________ _ Stay up to date on your PC, the Web, and your mobile phone with Windows Live. http://clk.atdmt. com/MRT/go/ msnnkwxp10200931 85mrt/direct/ 01/ [Non-text portions of this message have been removed] Get your new Email address! Grab the Email name you've always wanted before someone else does! http://mail.promotions.yahoo.com/newdomains/aa/ [Non-text portions of this message have been removed]