What I\'m Doing:
I basically need to create a website secured by a login page written in PHP that once logged in, you have a search bar that reads i
A recommended way of handling file downloads via PHP (or any other script) is by using the so called 'X-Sendfile' response header.
The PHP script handles the authentication and once validated it will set a few response headers together with an 'X-Sendfile' that tells the web server to deliver a file; the script ends and the web server takes over.
See here for a simple example:
http://www.jasny.net/articles/how-i-php-x-sendfile/