IT.COM

Create Login Page in PHP and MySQL with Session

Spaceship Spaceship
Watch

manoj2010

New Member
Impact
0
hello ,
I coded a pretty basic but highly functional login/logout mechanism in PHP and Mysql with session. I thought it will be very good for beginner.

also you can understand how it will work :)
i assured you will enjoy ,
if any issue please share with comments
here is the link : coding-trick.blogspot.in/2014/10/create-login-page-in-php-and-mysql-with.html
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
Good start. Just a few things I spot:

  • $_SESSION['IsLogin'] - if the user just loaded the page for the first time this might not be set right away even if they are truly logged in. So you need something that happens if $_SESSION['IsLogin'] is null.
  • $_SESSION['IsLogin']="Yes" is not a secure way to validate if a user has really logged in and who they are.
  • The password should never be stored as plain text in the database.
 
0
•••
This is borderline spam as you could have used the insert code function to display PHP and provide the same tutorial without link dropping, though I don't see your ads covering the page, so will not act as of now. It looks like a pretty good start for someone to learn sessions though (but be a little more careful and read the rules).
PHP:
<?php echo md5("Thank you Tia"); ?>
 
0
•••
Good start. Just a few things I spot:

  • $_SESSION['IsLogin'] - if the user just loaded the page for the first time this might not be set right away even if they are truly logged in. So you need something that happens if $_SESSION['IsLogin'] is null.
  • $_SESSION['IsLogin']="Yes" is not a secure way to validate if a user has really logged in and who they are.
  • The password should never be stored as plain text in the database.

Thank you for your valuable comment , i will take care this :)
 
0
•••
0
•••
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back