Advertisement
Guest User

Untitled

a guest
Jul 28th, 2016
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.31 KB | None | 0 0
  1. <link rel="stylesheet" type="text/css" href="bootstrap/bootstrap.css">
  2. <link rel="stylesheet" type="text/css" href="style.css">
  3.  
  4. <div class="middlePage">
  5.  
  6. <div class="page-header">
  7.  
  8.  
  9. </div>
  10.  
  11. <div class="panel panel-info" style="background-color:black">
  12.  
  13. <div class="panel-heading">
  14.  
  15. <h3 class="panel-title">Please Sign In</h3>
  16. </div>
  17. <div class="panel-body">
  18.  
  19. <div class="row">
  20.  
  21.  
  22.  
  23. <div class="col-md-7" style="border-left:1px solid #ccc;height:160px">
  24.  
  25. <form class="form-horizontal" method="post" action="" enctype="">
  26. <fieldset>
  27.  
  28. <input id="textinput" name="email" type="email" placeholder="Enter Email" class="form-control input-md" required>
  29.  
  30.  
  31. <input id="textinput" name="pass" type="password" placeholder="Enter Password" class="form-control input-md" required>
  32. <div class="spacing">
  33.  
  34. <input type="checkbox" name="checkboxes" id="checkboxes-0" value="1" ><small>
  35. Remember me
  36. </small>
  37. </div>
  38. <input type="submit" value="Log in" id="singlebutton" name="submit" class="btn btn-info btn-sm pull-right">
  39. </fieldset>
  40. </form>
  41. </div>
  42. </div>
  43. <p>Sign up if you have no accoount</p>
  44. <div class="spacing"><a href="signup.php"><small><button id="singlebutton" name="singlebutton" class="btn btn-info btn-sm pull-right">Sign up</button></small></a></div>
  45.  
  46. </div>
  47. </div>
  48.  
  49. $email = $_POST['email'];
  50. $pass = $_POST['pass'];
  51.  
  52.  
  53.  
  54. $servername = "localhost";
  55. $username = "root";
  56. $password = "";
  57. $dbname = "logininfo";
  58.  
  59.  
  60. $conn = new mysqli($servername, $username, $password, $dbname);
  61.  
  62.  
  63. if ($conn->connect_error)
  64. {
  65. die("Connection failed: " . $conn->connect_error);
  66. }
  67.  
  68. $numrows = mysqli_num_rows($query);
  69.  
  70.  
  71. if ($numrows!=0)
  72. {
  73.  
  74. while ($row = mysqli_fetch_assoc($query))
  75. {
  76. $email = $row['email'];
  77. $pass = $row['password'];
  78. $name = $row['firstname'].' '.$row['lastname'];
  79. }
  80.  
  81. echo "Welcome ".$name;
  82.  
  83. }
  84.  
  85.  
  86. else
  87. {
  88. die("incorrect email/password!");
  89. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement