Jump to content


This topic is now archived and is closed to further replies.


PHP download script

Recommended Posts


I'm a PHP newbie working on my first project to build a simple form which emails me the content (this I've done successfully) and then triggers a file download. This is where I’m a bit stuck.

I’ve tried (what seem to me to be) obvious things like trying to trigger hyperlinks etc, I’ve searched all over the place for tutorials, (I can find loads of them for uploading), but I can’t find anything for creating a download script.

I’d really appreciate any tips, or URL’s of appropriate tutorials.
Many thanks in advance


Share this post

Link to post
Share on other sites
Could you show a link on the page once the form is submitted like this:?

Place a hidden form element named "goodtogo" with a value of "you bet!" in your form, once submitted:

if($_POST['goodtogo']) {
echo "<a href=\"where/file/is.zip\">Download Now!</a>";

Not sure if this helps, but I hope it inspires great things.  :)

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.