Advertisement
Guest User

pehap

a guest
Nov 24th, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.37 KB | None | 0 0
  1. <?php
  2. $imie=$_POST['a'];
  3. $nazwisko=$_POST['b'];
  4.  
  5. $db=new mysqli('localhost', 'root', '', 'first');
  6. $wstaw=$db->query("insert into ucznie set imie='$imie', nazwisko='$nazwisko'");
  7. $pokaz=$db->query("select * from ucznie");
  8.  
  9. while($row=$pokaz->fetch_assoc()){
  10.     echo "<tr><td>".$row['id'].". "."</td><td>".$row['imie']." "."</td><td>".$row['nazwisko']."</td></tr><br>";
  11. }
  12. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement