I am using PHP and MYSQL for my download archive and would like password protect some of the files I'm uploading.
I have MYSQL database working and pretty much understand the basics of it'soperation.
This is what I'm trying to do.
The Files I'm uploading are inserted into the database with there download URL as well. What I have done so far is added a table column called password.
Each file I would like passworded I have added the password to this file in this coloumn.
When downloading the file, it calls it through a download.php file.
What I'd like to happen, is when the download.php is called with the ID, is make a MYSQL query to the database, to see if the file has
a password entered. If not it allows the download to continue. If it has, it directs to another PHP file - ie. password.php. Which has a form with a password field on asking for the password. If the password is correct, file downloads.
If not this script redirects back to homepage.
So, ultimately -
How do I query a MYSQL Table's Column to return all the results that have information in them, some of the information has a blank in them,
I want to only return the results of cells that have something in it!
SELECT * FROM (TABLE_NAME) WHERE (COLUMN_NAME) LIKE '%'
This returns all results whether info in them or not.
(This is of course using PHPMyAdmin!)
Where can I get hold of a script for the password entry...?
I know I could make this script myself - if I had any clue - but sadly I can only make the form. I don't know how to process it using PHP. :o(
Any help would be HUGELY appreciated.
Thankz in advance.