Advertisement
Guest User

Untitled

a guest
Mar 24th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. <?php
  2.  
  3. session_start();
  4.  
  5. ?>
  6. <!DOCTYPE html>
  7. <html>
  8. <head>
  9. <title>KingstoneSPRX-LOG IN</title>
  10. <link rel="stylesheet" type="text/css" href="Webbstyle.css">
  11. <link rel="stylesheet" type="text/css" href="Sidebarstyle.css">
  12. <link rel="stylesheet" type="text/css" href="login.css">
  13. <script src="Webbscripts.js"></script>
  14. <meta name="viewport" content="width=device-width, initial-scale=1">
  15. <link href="https://fonts.googleapis.com/css?family=Raleway" rel="stylesheet">
  16. <link rel="shortcut icon" href="img/WebLogo.png" type="image/x-icon"/>
  17.  
  18. </head>
  19. <body>
  20. <center>
  21.  
  22. <div class="Signbox">
  23. <h1>Log in</h1>
  24. <form action="login.php" method="POST" class="login-container">
  25. <input type="text" name="userkey" placeholder=" Product key" required="true" max="4"><br><br>
  26. <button type="submit" name="submit" class="Rigsbtn">Log in</button>
  27. </form>
  28. <div id="Logtext">
  29. <p>Don't have any product key?<a href="Singupform.php"> Get </a> here</p>
  30. </div>
  31. </div>
  32. </center>
  33.  
  34. //Php scripten
  35.  
  36. <?php
  37. session_start();
  38. include 'database.php';
  39.  
  40. $uid = htmlspecialchars($_POST['username']);
  41. $email = htmlspecialchars($_POST['email']);
  42. $pwd = htmlspecialchars($_POST['password']);
  43. $pwd2 = md5($pwd);
  44. $hashedpwd = $pwd2;
  45.  
  46. $sql = "INSERT INTO user(uid, pwd) VALUES ('$uid', '$pwd2')";
  47. $result = mysqli_query($conn, $sql);
  48.  
  49. header("Location: index.php");
  50.  
  51.  
  52. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement