Facebook
From strajlak, 4 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 183
  1. <html>
  2. <head>
  3. <meta charset="UTF-8">
  4. <link rel="stylesheet" href="styl.css" type="text/css" />
  5. </head>
  6. <body>
  7. <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
  8. <center>
  9. <div class="formularz"><br>
  10. <form action="" method="POST">
  11. <center>
  12. <input type="text" placeholder="Imię" name="imie">
  13. <input type="text" placeholder="Nazwisko" name="nazwisko">
  14. <input type="text" placeholder="Stanowisko" name="stanowisko"><input type="submit" value="Dodaj">
  15. </center>
  16. </form>
  17. </div><center>
  18. <?php  
  19.     @$imie=$_POST['imie'];
  20.     @$nazwisko=$_POST['nazwisko'];
  21.     @$stanowisko=$_POST['stanowisko'];
  22.     @$db = new mysqli("localhost","root","","baza");
  23.     $sql = "INSERT INTO pracownicy SET imie='$nazwisko',nazwisko='$imie', stanowisko='$stanowisko'";
  24.     @$wynik = $db->query($sql);
  25.     mysqli_close($db);  
  26.     ?>
  27. </body>
  28. </html>