Thread: MYSql Quering
View Single Post
Old 11-27-2002, 07:30 AM   PM User | #2
mat
Regular Coder

 
Join Date: Jul 2002
Posts: 199
Thanks: 0
Thanked 0 Times in 0 Posts
mat is an unknown quantity at this point
Quote:
I want to only return the results of cells that have something in it!
SELECT * FROM table_name WHERE column_name > '';



Quote:
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.

I think by the sounds of it general http user/pass auth would be better, it would allow you to just keep the files in a folder you want to be secure instead of using php and actually putting the files into a mySQL table,

you could just put everything in that folder and people who want to acces anything in there (files/pages) would need U:P to be able to. quick and simple. you know where a little pop up box comes up and asks for user/pass?

http://www.he.net/info/htaccess/demo.html
http://faq.clever.net/htaccess.htm
http://www.javascriptkit.com/howto/htaccess.shtml

lots more info around on this and I'm sure users here who have dealt with this could help.


If you think php/mySQL would be better then you'll need to give more info for instance:

Quote:
When downloading the file, it calls it through a download.php file.
What I'd ...
make no sense to me they are downloading the file but they need to provide user/pass to download the file

what I'm wondering is how exactly you get to the 'file downloading' bit? how is that file choosen? you say there is a form where the user puts in U:P right? is there like some sort of option list with the available files for download to choose from...?

Last edited by mat; 11-27-2002 at 07:46 AM..
mat is offline   Reply With Quote