Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include("config.php");
- session_start();
- if($_SERVER["REQUEST_METHOD"] == "POST") {
- // username and password sent from form
- $myusername = mysqli_real_escape_string($db,$_POST['username']);
- $mypassword = mysqli_real_escape_string($db,$_POST['password1']);
- $verifypass = mysqli_real_escape_string($db,$_POST['password2']);
- if($mypassword != $verifypass)
- {
- $error = "Passwords don't match.";
- }
- else
- {
- $sql = "INSERT INTO admin (username, passcode) VALUES ('$myusername', '$mypassword')";
- $result = mysqli_query($db,$sql);
- header("Location: login.php");
- }
- }
- ?>
- <html>
- <head>
- <title>WHAT THE FUCK</title>
- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.0/jquery.min.js"></script>
- <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
- <style type = "text/css">
- body {
- font-family: Impact, Haettenschweiler, "Franklin Gothic Bold", "Arial Black", "sans-serif";
- text-shadow: rgb(0, 20, 255) 0px 0px 10px, rgb(0, 126, 255) 0px 0px 10px;
- font-size:14px;
- background-color: black;
- margin-top: 20%;
- }
- label {
- font-weight:bold;
- width:100px;
- font-size:14px;
- }
- .box {
- border:dodgerblue solid 1px;
- background-color: black;
- }
- body, html{
- overflow-y: hidden;
- overflow-x: hidden;
- color: ghostwhite;
- }
- #someid {
- position: absolute;
- width: 300px;
- height: 100px;
- z-index: 15;
- top: 50%;
- left: 50%;
- margin: -50px 0 0 -150px;
- }
- </style>
- <link rel="stylesheet" type="text/css" href="animations.css">
- </head>
- <body bgcolor = "black">
- <div class="row ">
- <div class=" animated fadeIn " id="someid">
- <div align = "center">
- <form action = "" method = "post">
- <label>Username :</label><input autocomplete="off" type = "text" name = "username" class = "box"/><br /><br />
- <label>Password :</label><input autocomplete="off" type = "password" name = "password1" class = "box" /><br/><br />
- <label>Verify :</label><input autocomplete="off" type = "password" name = "password2" class = "box" /><br/><br/>
- <input type = "submit" style="position: absolute; left: -9999px; value = " Submit "/><br />
- </form>
- <div style = "font-size:11px; color:black; background-color: black; margin-top:10px"><?php echo $error; ?></div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement