Jump to content

Download authentication problem


amars

Recommended Posts

hey guys a novice coder needs help here.

 

I have about 10 downloads on a single page.

Clients wants that when visitor clicks on one download it takes you to a form.

Once the form is necessary information completed and form filled and submitted the download begins.

Now when they click on another download it would download instantly without the need to fill out any form.

 

How can I achieve this in a most basic manner in php with reasonable security?

Link to comment
Share on other sites

ok. here's the structure.

 

downloads.php has all the links to various files.

 

visitors can select whatever file they want to download from the server and click it.

 

then a pop up window would open and ask you to fill out the form. a sessions variable called "filename" will be stored with a variable to recognize the file that visitor clicked.

 

once the form is filled out, submit button sends all details to "pro.php". this file will save all "POST" data into session variables. It then sets a session variable called "download" to "true".

 

now i need to POST all the form data to my formmail.pl and start the download for the file which was clicked by retreiving "filename" and take the user back to downloads.php.

 

when visitors click any download "download" variable will be checked. if it's true then download begins instantly, otherwise popup form.

 

Questions:

How do I send variables without making forms?

How can I POST to formmail.pl, start the download by retreiving FILENAME and take the user back to downloads.php, all in one click?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.