|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Registration form to allow users access to protected documents
Hello everyone.
Please bare with me as I try to explain what I need and what the goal is. I am looking for a simple script, that I can use on our website to force users to fill out a standard form before they have access to specific documents To be more specific, a basic process would be something like this.. User clicks on link for a file They are prompted to fill out a basic form (name, address, phone, product interests etc.) Once completed, they will be forwarded to where they can download the file (pdf,.doc etc) Im not looking for anything that requires username or password, just something simple to force them to fill out a form and then redirect them to whether they can access the file. Any help is greatly appreciated. I dont even know if theres such a thing that can do all of this. We are willing to purchase the script if neccessary, but we are having absolutely no luck in searching for one. Thank you all in advance, and again Thank you for your time and efforts ! Regards Zamen Au |
|
#2
|
||||
|
||||
|
You could easily do this with asp or php. Simply have the file link point to the form. When the user fills out the form, the asp or php handler page sticks the info into a database, or emails it, or whatever, then directs them to the page where they can actually d/l the file. Make the name of that page hard to guess, and you'll have a functional system.
See what your server supports (php or asp) and look into it. There are plenty of online tutorials. There are also asp and php forums here, if you have questions as you make the page. Good luck
__________________
--Dave-- U2kgSG9jIExlZ2VyZSBTY2lzLCBOaW1pdW0gRXJ1ZGl0aW9uaXMgSGFiZXM= |
|
#3
|
|||
|
|||
|
Hey Karsh
thanks for responding Ive done some search for ASP, and PHP The server supports both, but I couldnt find anyting. perhaps Im looking in the wrong direction What exactly would this be filed under? Is it considered document management, password protection I realize its really a two step process (form, and the security) but i guess theres so much scripts out there.. If you know any, please advise.. I will continue looking.. thanks Zamen |
|
#4
|
||||
|
||||
|
Well, I know asp, so if you end up choosing php, I'm no help.
I'm assuming you know at least some html, and can figure out how to make a form. What you will want to do is set up your pages like this: file link--->form--->d/l page The file link is easy, just an html link to your form, which I'll call "myform.asp". You will also be coding a form handler page, which I'll call "myhandler.asp". When you make myform.asp, you will use <form> tags. You need to set the "action" attribute to "myhandler.asp". So, your first form tag will look something like <form name="myform.asp" method="POST" action="myhandler.asp"> Then you will put in fields for all the information you want, and name the fields accordingly. The form handler will be using asp, so the code will be in <% %> tags. The information from the form can be obtained by using "request.form("fieldname")". The data can then be inserted into a database or emailed or whatever. Search google for what you want to do. At the bottom of the form handler, you'll do a "response.redirect "d/l pagename" ", which sends the user to the page where they can actually get the file. The actions in the form handler are not seen my the user, they will simply submit the form and go to the d/l page. Since you said you didn't need a password, and just wanted the user to fill out the form before getting to the download, this should be good. Oh, you should name the page where the file is actually downloaded something like "PO234akh" so that users won't guess it and bypass the form. Hope this helps. Post some questions in the asp forum if you need more help (or php, if you decide you don't like asp). Good luck |
|
#5
|
|||
|
|||
|
Hi Dave
Ok , I see where you getting at and so far its good But heres another dilemna, sorry I didnt mention We obviously have more than 1 file that users can access, and they are certainly allow to access any of the files However, We dont need the user to fill out a form for each file, but we also know the only way we can do that is if we .. set all the initial links directed to the web form , after completion.. send the user to a page where all the links are available for all the files. Is this the proper way of doing this? any other methods? I was looking into a cookie base type of script, where a user would fill out a form and after completion, it would set a cookie into their browser. By doing so, they will have access to any of the files without being prompted to fill out a form again. I know this is tough being were not going to use a database and have a registration system, so I dont see it possible that the server could tell if the user filled out a form without a password or some kind of script to identify the user. I wll research futhermore into this, and discuss your solution with the others Again, thank you for your help and I truly appreciate it Sincerely Zamen A |
|
#6
|
||||
|
||||
|
Well, it depends on how often you want the users to fill out the form. If you want them to only fill it out once, no matter how often they come back, I'd say set a cookie with a long expiration, and check the cookie before loading the form.
If you want them to fill out the form each time they visit, but only once per visit, then follow your idea and make a page with all the links to sit behind the form. Out of curiosity though, what are you going to do with the information? If you don't have a database, where are you going to store it? Cheers |
|
#7
|
|||
|
|||
|
Your question is the same as mine
Top management doesnt want to create another database, to store and manage the data what we will receive from these forms It is apparent that the forms are just used to collect data from the prospective clients who visit our site. That information will just be used for sales dept to check on leads. Would you happen to know any cookie scripts that are set without the user typing in password . So basically, have the user fill out a form, after completion ..sent to another page where the cookie is set. From that pt on, the user has option to go to any of the sections where the files are accessible. just wondering. thanks Zamen |
|
#8
|
||||
|
||||
|
You really need to talk to this management about a database. This sort of data collection and use just screams for a database to keep it organized and easy to access.
As for a script: I don't really have much experience with cookies, so I don't want to try making one for you. However, I think they are pretty easy, and you don't need a password or anything to use them. There's lots of information on google, and you can look at www.cookiecentral.com for more. If you run into problems with the cookie, post a question in the asp forum, there are people there more knowledgeable than I. HTH |
|
#9
|
|||
|
|||
|
We've tried. You know how this story goes...
However , Im sure if it gets to the pt where they cant handle it.. they'll start thinking twice about their decision I have no authority on this unfortunately, I just do as told.. and to be honest with you, Im taking over someones else's job to do this part which explains why Im here asking for assistance =) I leaning more towards the cookie side, and I think Ive mightve found something.. Gotta try and see how that goes Thanks Dave for all your help again Z |
|
#10
|
||||
|
||||
|
No problem. Good luck
![]() |
![]() |
| Viewing: Dev Shed Forums > Other > Beginner Programming > Registration form to allow users access to protected documents |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|