Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Form input processing
Old 11-09-2009, 09:50 PM Form input processing
Junior Talker

Posts: 1
Name: david sutherland
Trades: 0
Using .htaccess i have a password protected folder online containing 7 files with one single user/pass combination.
User is not allowed to see that 7 files are available.
User enters 1 of 7 "Access Keys" in a simple HTML Form text input which is then processed (script?)
User is then redirected automatically to the related file (for download) e.g.
Access Key #1 redirects user to Protected File #1
Access Key #4 redirects user to Protected File #4
etc.

What's the best way to implement this? Perl/CGI? PHP? Javascript?
escocia1 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 11-10-2009, 06:18 AM Re: Form input processing
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
server side code.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 11-12-2009, 06:29 AM Re: Form input processing
Super Talker

Posts: 139
Name: John Davis
Trades: 0
The best way to read required file via script (I prefer PHP) and then send it to user as download file.
__________________
»
Please login or register to view this content. Registration is FREE
- Interactive maps for websites
»
Please login or register to view this content. Registration is FREE
for web developers
MapMaster is offline
Reply With Quote
View Public Profile Visit MapMaster's homepage!
 
Old 11-12-2009, 06:25 PM Re: Form input processing
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
ALL server side languages can redirect from page to page.

And PHP does NOT support htaccess it is the APACHE web server that uses htaccess.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 11-13-2009, 06:07 AM Re: Form input processing
Super Talker

Posts: 139
Name: John Davis
Trades: 0
Quote:
Originally Posted by chrishirst View Post
ALL server side languages can redirect from page to page.

And PHP does NOT support htaccess it is the APACHE web server that uses htaccess.
Agree. But I mean not redirect from page to page. I said about reading necessary file to data stream.

Code:
$fsize = filesize($filepath);
                    
header("Pragma: no-cache");  
header("Content-Disposition: attachment; filename=$name"); 
header("Content-Length: $fsize"); 
header("Content-Type: application/octet-stream");
header("Content-Transfer-Encoding: binary\n"); 
header("Content-Description: file downloading"); 
readfile($filepath);
exit();
__________________
»
Please login or register to view this content. Registration is FREE
- Interactive maps for websites
»
Please login or register to view this content. Registration is FREE
for web developers
MapMaster is offline
Reply With Quote
View Public Profile Visit MapMaster's homepage!
 
Old 11-13-2009, 06:15 AM Re: Form input processing
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Quote:
Originally Posted by MapMaster View Post
Agree. But I mean not redirect from page to page. I said about reading necessary file to data stream.
Yep. However, I was replying to post #4 and the usual "I'll get a signature link here mentality"
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to Form input processing
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.22784 seconds with 12 queries