"login page"
Bootstrap 3.2.0 Snippet by suchit

<link href="//netdna.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//netdna.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <!------ Include the above in your HEAD tag ----------> <?php session_start(); ?> <?php $message=""; include("connect.php"); if(isset($_POST['login'])) { $result = mysql_query("SELECT * FROM emp_usermaster WHERE femail='" . $_POST["user_name"] . "' and password = '". $_POST["password"]."'") or die(mysql_error()); $row = mysql_fetch_array($result); $femail=$row['femail']; $empId=$row['empId']; $fkey=$row['fkey']; if(is_array($row)) { //$_SESSION["empId"]="empId"; $_SESSION["femail"]=$femail; //echo $femail; $_SESSION["empId"]=$empId; $_SESSION["fkey"]=$fkey; header("Location:main.php"); } else { print("<script>"); print "alert('Invalid Username or Password!')"; print("</script>"); //$message = "Invalid Username or Password!"; } } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head> <body bgcolor="#CCCCCC"> <form role="form" action="#" method="post"> <table align="center" style="margin-top:50px;" > <tr><th colspan="3">Login Here</th></tr> <tr> <th>Email ID</th><td>:</td> <td><label for="textfield"></label> <input type="text" name="user_name"></td> </tr> <tr> <th>Password</th><td>:</td> <td><label for="textfield2"></label> <input type="text" name="password"></td> </tr> <tr> <td colspan="3"><input type="submit" value="Submit" name="login"></td> </tr> </table> </form> </body> </html>

Related: See More


Questions / Comments: