Advertisement
Guest User

Untitled

a guest
Feb 16th, 2017
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.23 KB | None | 0 0
  1.  <?php
  2.         $servername = "192.168.101.147";
  3.         $username = "gamerpro_account";
  4.         $password = "michal231";
  5.         $dbname = "gamerpro_accounts";
  6.  
  7.         // Create connection
  8.         $conn = new mysqli($servername, $username, $password, $dbname);
  9.         // Check connection
  10.         if ($conn->connect_error) {
  11.             die("Connection failed: " . $conn->connect_error);
  12.         }
  13.  
  14.         $user = $_POST ['nick'];
  15.         $haslo1 = $_POST ['haselko1'];
  16.         $email = $_POST ['e_mail'];
  17.        
  18.        
  19.         $sql = " INSERT INTO user_cache VALUES (NULL, '$user', '$haslo1', '$email')";
  20.  
  21.        
  22.         if ($conn->query($sql) === TRUE) {
  23.             echo "  ";
  24.         } else {
  25.             echo "Error: " . $sql . "<br>" . $conn->error;
  26.         }
  27.  
  28.         $conn->close();
  29.     ?>
  30.    
  31. <title>Rejestracja</title>
  32. <meta name="viewport" content="width=device-width, initial-scale=1">
  33. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  34. <script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>
  35. <link href="css/style.css" rel="stylesheet" type="text/css" media="all" />
  36. <link href='//fonts.googleapis.com/css?family=Open+Sans:400,300,600,700,800' rel='stylesheet' type='text/css'>
  37. </head>
  38. <body>
  39.  
  40.     <form method="post" action="../index">
  41.     <div class="w3layouts-main">
  42.         <div class="agilesign-form">  
  43.             <div class="agileits-top">
  44.                 <form action="#" method="post">
  45.                     <div class="styled-input w3ls-text">
  46.                         <br /> <input type="text" name="nick" VALUE=""/>
  47.                         <label>Login</label>
  48.                         <span></span>
  49.                     </div>
  50.                     <div class="styled-input w3ls-text">
  51.                         <br /> <input type="text" name="e_mail" VALUE=""/>
  52.                         <label>Email</label>
  53.                         <span></span>
  54.                     </div>
  55.                     <div class="styled-input w3ls-text">
  56.                         <br /> <input type="password" name="haselko1" VALUE="">
  57.                         <label>Hasło</label>
  58.                         <span></span>
  59.                     </div>
  60.                     <div class="styled-input w3ls-text">
  61.                         <br /> <input type="password" name="haselko2" VALUE=''>
  62.                         <label>Powtórz hasło</label>
  63.                         <span></span>
  64.                     </div>
  65.                     <div class="wthree-text">
  66.                     <div class="agileits-bottom">
  67.                         <input type="submit" value="Zarejestruj">
  68.                     </div> 
  69.                 </form>
  70.             </div>
  71.         </div> 
  72.     </div>
  73.      
  74. </body>
  75. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement