Jump to content


PHP download script

  • Please log in to reply
1 reply to this topic

#1 _giles_

  • Members
  • PipPip
  • Member
  • 25 posts

Posted 14 September 2006 - 07:49 PM


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


#2 ultrus

  • Members
  • PipPipPip
  • Advanced Member
  • 244 posts

Posted 14 September 2006 - 11:30 PM

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.  :)
Twitter | Blog | Worlds to explore. Worlds to create.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users