topic says it all
how do i make a login page
PHP.
Without MySQL: http://www.spoono.com/php/tutorials/tutorial.php?id=30
With MySQL: http://www.spoono.com/php/tutorials/tutorial.php?id=34
Without MySQL: http://www.spoono.com/php/tutorials/tutorial.php?id=30
With MySQL: http://www.spoono.com/php/tutorials/tutorial.php?id=34
Well, it all depends.
First off, HTML doesn't script for anything. It can't code. All it does it tell your browser how to display information. Thus, to make a login page, you're gonna need a scripting language. Either Javascript or PHP most likely.
First the Javascript route:
If you're gonna do a login page with Javascript, it will be VERY insecure. Since Javascript is client-side, all someone would have to do to find the password to a page is look at the source. Therefore, for anything that's half decent, Javascript is out. But if all you want is to restrict access to a not very secure page, Javascript should do just fine. Just pop up a password alert or something, and you're set.
Now, for PHP:
PHP is server-side. That means that the data is inaccessible to the user, and you can store information, and all sorts of fun things. PHP also has a variety of tools that are very conducive to having a login page, such as sessions or cookies. Thus, if you want anything more than a password to keep out the not 'net savy people, PHP is the way to go. If I were you, I'd go to w3schools or another place and do some learning up on PHP. If you just rip a script off the 'net, you'll likely have no idea what to do with it and be completely unable to modify it to your needs.
First off, HTML doesn't script for anything. It can't code. All it does it tell your browser how to display information. Thus, to make a login page, you're gonna need a scripting language. Either Javascript or PHP most likely.
First the Javascript route:
If you're gonna do a login page with Javascript, it will be VERY insecure. Since Javascript is client-side, all someone would have to do to find the password to a page is look at the source. Therefore, for anything that's half decent, Javascript is out. But if all you want is to restrict access to a not very secure page, Javascript should do just fine. Just pop up a password alert or something, and you're set.
Now, for PHP:
PHP is server-side. That means that the data is inaccessible to the user, and you can store information, and all sorts of fun things. PHP also has a variety of tools that are very conducive to having a login page, such as sessions or cookies. Thus, if you want anything more than a password to keep out the not 'net savy people, PHP is the way to go. If I were you, I'd go to w3schools or another place and do some learning up on PHP. If you just rip a script off the 'net, you'll likely have no idea what to do with it and be completely unable to modify it to your needs.
making a simple login page would be easy. like pat pointed out, some php code to look up the username/password in a mysql database would do. for added security, u can use some form of basic encryption.
the tricky part is securing the rest of the site. if u want to restrict certain pages so that only a person who is logged in, then u need to use cookies. that is a bit advanced, so look on the net for tutorials
the tricky part is securing the rest of the site. if u want to restrict certain pages so that only a person who is logged in, then u need to use cookies. that is a bit advanced, so look on the net for tutorials
Please keep in mind that if you are going to put passwords in Javascript, people can easily get past it just by disabling javascript.
Hey that was a question that had been in my mind for many months!!Is it possible to place or add a login page or an introductory page before my blogpage get loaded.Iam having a blogspace hosted in www.blogger.com as www.nivinjoy.blogspot.com.If it is possible plz help me to do so.Tell me how to do that
Last edited by nivinjoy on Mon Jul 02, 2007 9:33 am; edited 1 time in total
Last edited by nivinjoy on Mon Jul 02, 2007 9:33 am; edited 1 time in total
| Quote: |
|
Hey that was a question that had been in my mind for many months!! Is it possible to place or add a login page or an introductory page before my blogpage get loaded. Iam having a blogspace hosted in www.blogger.com as www.nivinjoy.blogspot.com If it is possible plz help me to do so.Tell me how to do that either by posting here or mail it to nivinjoy@gmail.com |
That is almost impossible. You could use a javascript one, but it is not secure as people could just view source. If you are hosting your own blog then that would not be a problem.
If it is possible, can someone please tell me a way?
Use .htaccess, .htpasswd - you shall use it with multiple users and passwords
http://www.webmaster-toolkit.com/htaccess-generator.shtml - check it here
http://www.webmaster-toolkit.com/htaccess-generator.shtml - check it here
With or without mysql
Without MySQL: http://www.spoono.com/php/tutorials/tutorial.php?id=30
With MySQL: http://www.spoono.com/php/tutorials/tutorial.php?id=34
Without MySQL: http://www.spoono.com/php/tutorials/tutorial.php?id=30
With MySQL: http://www.spoono.com/php/tutorials/tutorial.php?id=34
You can use automated free login scripts for that........... here are some of them
http://opensource.studiostaat.nl
http://www.phpdeadlock.org
http://russcom.net
http://www.scribax.com/pps.php
http://www.mpdolan.com/login_redirect.htm
http://opensource.studiostaat.nl
http://www.phpdeadlock.org
http://russcom.net
http://www.scribax.com/pps.php
http://www.mpdolan.com/login_redirect.htm
