Forum Moderators: coopster

Message Too Old, No Replies

Please make php to start a download?

How to make php and a submit form to start a download?

         

TecWizz

12:14 pm on Nov 13, 2003 (gmt 0)

10+ Year Member



Hi.

Sorry for my poor english.

I have this variable $string. The variable contents is pure html code, that have to be saved in a html file(saved.html) on the webserver.

After that, this file(saved.html) should automatically start download to the client computer, of cause with the approval of the client user.

The file(saved.html) that still is on the webserver after the client user is done downloading, needs to be cleared/emptied until the next client comes by.

All this has to be done with only one click(and the click, when user starts to download), with a <input type="submit" value="Done">.

Is there anyone who can help me please. I would be pleased.

Best regards
TecWizz

dcrombie

5:19 pm on Nov 13, 2003 (gmt 0)



Why does the file have to be created on the server at all? You can just send the content directly to the browser with the right Header commands. If the file does exist then you can use:

[php.net...]

;)