Advertisement
Guest User

Untitled

a guest
Oct 9th, 2018
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>Strona muzyczna</title>
  5. <meta charset="utf-8">
  6. <link rel="stylesheet" type="text/css" href="styl.css">
  7. </head>
  8. <body>
  9. <div id="baner"><h1><b>KUCZE MOJE POLE!</b></h1>
  10. </div>
  11. <div id="lewy"><h2>Tu kupisz NIC!</h2>
  12. <ol>
  13. <li>Nic</li>
  14. <li>Nic</li>
  15. <li>I nic</li>
  16. </ol>
  17. </div>
  18. <div id="prawy">
  19. <h2>Rejestracja</h2>
  20. <form action = "#" method = "POST" >
  21. <p><b>Dane osobowe</b></p>
  22. <label>Imię</label><br><input type="text" name="imie"/></br>
  23. <label>Nazwisko</label><br><input type="text" name="nazwisko"/></br>
  24. <label>Email</label><br><input type="text" name="email"/></br>
  25. <label>Haslo</label><br><input type="password" name="haslo"/></br>
  26. <input type="reset" value="Wyczysc"><input type="submit" value="Zarejestruj">
  27. </form>
  28. </div>
  29. <?php
  30. $servername = 'localhost';
  31. $username = 'root';
  32. $password = '';
  33. $database = 'baza';
  34. $connect = mysqli_connect($servername, $username, $password, $database);
  35.  
  36. $imie = $_POST['imie'];
  37. $nazwisko = $_POST['nazwisko'];
  38. $email = $_POST['email'];
  39. $haslo = $_POST['haslo'];
  40.  
  41.  
  42. echo '<p>konto</p>'.$_POST['imie'].' '.$_POST['nazwisko'].'<p>zostało zarejestrowane w bazie</p>';
  43.  
  44.  
  45.  
  46. $zapytanie1 = 'insert into uzytkownicy(imie, nazwisko, email, haslo) values ($imie, $nazwisko, $email, $haslo)';
  47. mysqli_query($connect,$zapytanie1);
  48. //create user 'user1'@
  49. ?>
  50. </body>
  51. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement