Forum Moderators: coopster

Message Too Old, No Replies

fill out a contact form before downloading

secure downloading

         

erikcute

4:17 am on Jan 13, 2009 (gmt 0)

10+ Year Member



Hi! I'm trying to create some sort of a contact form before anyone can download a file from my website. Can someone direct me to a tutorial for this?

Basically, I just want users to fill out a contact form each time they download a file from my site.

surrealillusions

11:05 am on Jan 13, 2009 (gmt 0)

10+ Year Member



Are you looking for people to register on your site before allowed to download files?

If so, you'll need a database and a server side language, MySQL and PHP go hand in hand, and theres plenty of ready built scripts out there and/or tutorials to help you build one.

:)

erikcute

3:16 pm on Jan 13, 2009 (gmt 0)

10+ Year Member



Nope...I just need to direct visitors to a contact form page before redirecting them to the file they want to download. :)

coopster

7:44 pm on Jan 14, 2009 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld, erikcute.

Set up your HTML form.
Upon successful submission (no errors, etc.), read the file from the filesystem and push it out to the browser with the correct mime type.

See the PHP readfile [php.net] and header [php.net] functions.