Ok, so I posted this on another forum only to be talked rudely to. Hopefuly I'll get a better response here LOL.
Right, so, on to buisness
I'm trying to get a download page sorted for someone who has a few PDF's, what they want is the user to fill in thier name and email before the download happens, Can anyone point me in the right direction here, I went looking for a script that would do this but I didnt have much luck.
Regards all!
A Little Help?
Moderator: General Moderators
Re: A Little Help?
Do you want them to enter credentials before they access the index of PDFs... or once they click on a individual PDF? What are your plans for the credentials once you have them?
In the former, just put a login page in front of the PDF index. Then you can throw the name and email in to a session variable for use on subsequent requests.
In the latter, you would have to prompt the user for the info onClick of a PDF.
If you're going to require people to provide the info for any of the PDFs, I would go with the first option.
In the former, just put a login page in front of the PDF index. Then you can throw the name and email in to a session variable for use on subsequent requests.
In the latter, you would have to prompt the user for the info onClick of a PDF.
If you're going to require people to provide the info for any of the PDFs, I would go with the first option.
-
BullitMagnet
- Forum Newbie
- Posts: 2
- Joined: Tue Feb 15, 2011 10:53 am
Re: A Little Help?
The credentials would either be emailed to them after a user fills it in or stored in a database for retrieval later, It is when the user clicks the file, I would prefer the former rather than the latter, but the person i'm doing this for is quite adamant about that.
Re: A Little Help?
Ok. So one approach might be... when the user clicks are a particular PDF, you send them to download.php?file=PDFNAME.pdf. On download.php you have a form with name and email inputs. When the form is submitted, send it to download.php, check for the POST data, write the data to the database/or email, and then redirect them to the PDF file.