![]() |
login system
ok im making a simple login. And im wondering how to make one besides using php. here's the code:
HTML file: :
<html>:
<html> |
Re: login system
Besides PHP??? You mean storing usernames and passwords in a database?
|
Re: login system
Quote:
|
Re: login system
if you are doing this in javascript then anyone can see what the username and password is suppose to be. And then there really isn't any point to the login.
|
Re: login system
The problem with a JavaScript login system is that anyone can see the JavaScript. They can also turn it off. They can also overwrite it to return whatever they want. That's the problem with trusting the client - you can't.
Using PHP on the other hand, the user has to input values and those are validated on the server - which the user [hopefully] has no control over. This is why PHP logins are more secure. With PHP (or another server-side language), you can also use a database to store login information, so it's a ton more scalable as well. That said, your PHP code is incorrect. You need to make the comparison for both strings, not just one. The if statement will probably work with any username so long as the password is "admin". |
Re: login system
well the thing is its suppose to be for the psp and its not going to be hosted or anything its just a simple login. so it wont matter who can see the username or password because the person wont be connected to the internet. and the reason im not doing PHP is because PHP isnt installed on the PSP. And thanks for the mistake i didnt see that before. ;) also then what should i put instead of if?
|
Re: login system
ok corrected the php file to this. and it works:
:
<html> |
| All times are GMT -5. The time now is 4:01 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC