daily pastebin goal
52%
SHARE
TWEET

Untitled

a guest Dec 22nd, 2017 73 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4.     <meta charset="utf-8">
  5.     <title>Registration</title>
  6.     <link href="https://fonts.googleapis.com/css?family=Raleway:400,700,900" rel="stylesheet">
  7.     <link rel="stylesheet" href="form_style.css">
  8. </head>
  9. <body>
  10.     <?php
  11.         $connect = mysql_connect("localhost", "root","") or die(mysql_error());
  12.         mysql_select_db("autorize");
  13.        
  14.         if (isset($_POST['submit']))
  15.         {
  16.             $username = $_POST['username'];
  17.             $login = $_POST['login'];
  18.             $password = $_POST['password'];
  19.             $r_password = $_POST['password'];
  20.  
  21.             if ($password == $r_password){
  22.                 $password = md5($password);
  23.                 $zapros = "insert into users set name='".$username."', login='".$login."', password='".$password."'";
  24.                 $query = mysql_query($zapros) or die(mysql_error());
  25.             }else{
  26.                 die ("Passwords must match!");
  27.             }
  28.         }
  29.     ?>
  30.    
  31.     <div class="reg">
  32.         <div class="al-reg">
  33.         <form method="post" action="registr.php">
  34.         <span>Registration</span><br>
  35.         <input type="text" name="username" placeholder=" Username" required /><br>
  36.         <input type="text" name="login" placeholder=" Login" required /><br>
  37.         <input type="password" name="password" placeholder=" Password" required /><br>
  38.         <input type="password" name="r_password" placeholder=" Repeat password" required /><br>
  39.         <input type="submit" name="submit" value="Register" /><br>
  40.         <a href="main.html">home page</a>
  41.         </form>
  42.         </div>
  43.     </div>
  44. </body>
  45. </html>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top