Gmunky Posted July 31, 2007 Share Posted July 31, 2007 i have a site where a user can type in a reference number and when it is a valid reference number, the user is taken to a page where he can click on a button to download a pdf file. when the user clicks on the button there is an open/save prompt and the name of the file is shown on the prompt window. How can I stop the user from typing the name of the file at the end of the current url and just view the file that way instead of having to type in a reference number? thanks for all the help! Quote Link to comment https://forums.phpfreaks.com/topic/62655-allow-file-download-to-certain-users/ Share on other sites More sharing options...
tanvir Posted July 31, 2007 Share Posted July 31, 2007 Instead of using GET you should use POST. It is a very basic solution. Quote Link to comment https://forums.phpfreaks.com/topic/62655-allow-file-download-to-certain-users/#findComment-311840 Share on other sites More sharing options...
Vizor Posted July 31, 2007 Share Posted July 31, 2007 Using .htaccess you could check whether a user came from a specific page, such as your validation page and then if they have allow them to download else redirect them to some warning page. Quote Link to comment https://forums.phpfreaks.com/topic/62655-allow-file-download-to-certain-users/#findComment-311845 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.