Create Your Login Form :
<form method="POST" name="login" id="login" action="?login=true">
<label>Email</label> <input type="text" name="email" size="20">
<label>Password</label> <input type="password" name="password" size="20">
<input type="submit" value="Submit" name="submit">
</form>
You can either use
HTML 5 form field validation or
jQuery form field validation
to validate your login form.
Validate user authentication through PHP:
<?php
include("connection.php");
if($_GET['login']=='true'){
$email = mysql_real_escape_string($_POST['email']);
$password = mysql_real_escape_string(md5($_POST['password']));
$sql = mysql_query("select * from register where email='".$email."'
and password ='".$password."' and status='active'");
$numrow = mysql_num_rows($sql);
if($numrow == 1){
$str="Welcome to A2Z webhelp";
header("Location:welcome.php?msg=$str");
}else{
$str="Sorry, Invalid login details.";
header("Location:login.php?msg=$str");
}
}
?>
Other Login/ Registration Systemss
Login/ Register With Twitter
Login/ Register With Linked In
Login/ Register With Yahoo!
Login/ Register With Gmail
Login/ Register With Hotmail
Login/ Register With Email