Hey all,

Here's my problem: php/mysql noob here.

I have an admin section on the website, and I have successfully password protected all the php pages in that directory using sessions. I have included code like this on the top of each of my pages:


if (checkLogin() != True) {
} else {
<!--html here -->

I have two users right now, myself and my friend.

The main function of the admin page was to be able to upload large video files to the server, and have the other one download them. My problem is is that even if domain.com/admin/index.php is password protected, domain.com/admin/videos/myvideo.mov is still a direct link to the file and not password protected.

I have searched around the web and I've seen alot of "use htacess/htpswd" but there's gotta be a way to do this with the existing user table I have set up in my database! Right?

Anyway, I don't need the full code, I would just like some nudges in the right direction, some links etc.

On the other hand, examples are welcome too!

Thanks in advance!

9 Years
Discussion Span
Last Post by zachabesh

Durrr... Thanks for the snippet, I'll try and implement, and post back when I'm done.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.