On Tue, 24 Aug 2004, Joe Echavarria wrote:
After a user fill out a form and submit it a perl script takes the user to a download page of my website. how can i prevent a user from directly access the download page using the web browser.., for example http://www.mydomain.com/download_page.html, i only want the user to able to download the file if he/she fill out and submit the form.
Any help on how to do that ?
Users can *always* get around such barriers, so don't get your hopes up that it will be perfect.
That said, you can make it harder, but not impossible, to get to the download page without filling out the form first.
The obvious way I can think of to do this is to make the download page a script that checks to see that:
* mandatory form fields are defined as input for the download script * the referring page is your original form (this one is probably less important than the previous criteria, if you think about it)
If these are not verified, send the user back to the form with a note saying that fields X, Y, and Z still need to be filled out.
If these are verified -- or, more to the point, if the form fields you need are verified -- then that's about as good as forcing the user to have visited the first page to begin with.
-- Chris Devers
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>