Advertisement
Guest User

Untitled

a guest
Oct 12th, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.07 KB | None | 0 0
  1. <?php
  2. include("config.php");
  3. session_start();
  4.  
  5. if($_SERVER["REQUEST_METHOD"] == "POST") {
  6. // username and password sent from form
  7.  
  8. $myusername = mysqli_real_escape_string($db,$_POST['username']);
  9. $mypassword = mysqli_real_escape_string($db,$_POST['password1']);
  10. $verifypass = mysqli_real_escape_string($db,$_POST['password2']);
  11.  
  12.  
  13. if($mypassword != $verifypass)
  14. {
  15. $error = "Passwords don't match.";
  16. }
  17. else
  18. {
  19. $sql = "INSERT INTO admin (username, passcode) VALUES ('$myusername', '$mypassword')";
  20. $result = mysqli_query($db,$sql);
  21. header("Location: login.php");
  22. }
  23. }
  24. ?>
  25. <html>
  26.  
  27. <head>
  28. <title>WHAT THE FUCK</title>
  29. <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
  30. <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.0/jquery.min.js"></script>
  31. <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
  32.  
  33. <style type = "text/css">
  34. body {
  35. font-family: Impact, Haettenschweiler, "Franklin Gothic Bold", "Arial Black", "sans-serif";
  36. text-shadow: rgb(0, 20, 255) 0px 0px 10px, rgb(0, 126, 255) 0px 0px 10px;
  37. font-size:14px;
  38. background-color: black;
  39. margin-top: 20%;
  40. }
  41.  
  42. label {
  43. font-weight:bold;
  44. width:100px;
  45. font-size:14px;
  46. }
  47.  
  48. .box {
  49. border:dodgerblue solid 1px;
  50. background-color: black;
  51. }
  52. body, html{
  53. overflow-y: hidden;
  54. overflow-x: hidden;
  55. color: ghostwhite;
  56. }
  57. #someid {
  58. position: absolute;
  59. width: 300px;
  60. height: 100px;
  61. z-index: 15;
  62. top: 50%;
  63. left: 50%;
  64. margin: -50px 0 0 -150px;
  65. }
  66. </style>
  67. <link rel="stylesheet" type="text/css" href="animations.css">
  68.  
  69.  
  70. </head>
  71.  
  72. <body bgcolor = "black">
  73. <div class="row ">
  74. <div class=" animated fadeIn " id="someid">
  75. <div align = "center">
  76.  
  77. <form action = "" method = "post">
  78. <label>Username :</label><input autocomplete="off" type = "text" name = "username" class = "box"/><br /><br />
  79. <label>Password :</label><input autocomplete="off" type = "password" name = "password1" class = "box" /><br/><br />
  80. <label>Verify :</label><input autocomplete="off" type = "password" name = "password2" class = "box" /><br/><br/>
  81. <input type = "submit" style="position: absolute; left: -9999px; value = " Submit "/><br />
  82. </form>
  83.  
  84. <div style = "font-size:11px; color:black; background-color: black; margin-top:10px"><?php echo $error; ?></div>
  85.  
  86. </div>
  87.  
  88. </div>
  89. </div>
  90. </div>
  91. </div>
  92.  
  93. </body>
  94. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement