Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Downloading a File from php code

Status
Not open for further replies.

minsan

Technical User
Jan 8, 2001
18
US
What is the simplest or quickest way to make a form button download a file that's in the same directory as the php file? Is there one such function?

I'm trying to make a button open up the File Download dialog box that the browser pops up when it's about to download a file.
 
This question has been answered several times on this forum first. I suggest you search for what you want to know, then if you don't find, ask.

Anyways, just use the header() funciton like so:

[tt]
header("Location: [/tt]

Hope this helps.

-Vic vic cherubini
krs-one@cnunited.com
====
Knows: Perl, HTML, JavScript, C/C++, PHP, Flash
====
 
Hi,
I am trying to show the client a form which then will able him/her to upload a picture to the server. The php code should save the picture in the database. I have been trying to find out how ? I have even tried to search this site but could not find anything. If someone can pls help.
Thanks,
Kachaloo :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top