User Portal!

Ok, I wasn't planning on coming up with this (and it's not that big of a deal) but before August 18th I need to find a way to add "minimal" security to that code, is it possible? Maybe I could put some fake logins and passwords in the code to confuse the user?

Any help is greatly appriciated! :)
 
There isn't any way that I know of to hide the password from someone with a web browser. Javascript isn't meant to be secure.

You could do it so easily with a PHP script and you wouldn't even need a database if you wanted to have only one user.

You would basically have the exact same script as you have with the Javascript, but with PHP syntax, and probably a PHP function to transfer you to another page or something.

Actually, now that I think of it, it'd be better to have the one page just display a login box if you aren't logged in, and display other content if you are logged in. That's pretty easy, as I've done it with ASP.

Any pages that you would want to be secure would have to be PHP pages as well and would have to check for the username/pw as well, but that's easy.

This is a bit more work than just a little javascript though.
 
Yeah man, not too hard at all. You just have to change all your pages to PHP, but there wouldn't be much PHP code in there.

It's basically like this:

if(user logged in)
display normal content
else
re direct to login page

to check if they are logged in, you can just store the username/password in a session variable and check if those variables exist in other pages. If the user hasn't logged in, then those variables won't exist.
 
Does sound easy, looks like I'll have some homework to do tonight.
Once more, thank you very much! :)
 
No problem :p

It shouldn't be very hard for you to do at all, even if you don't know much about PHP. The syntax is similar to C/C++
 
Back
Top