Advertisement
Guest User

Untitled

a guest
Sep 2nd, 2016
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. <?php
  2. require_once "connect.php";
  3. $user=$_POST['login'];
  4. $password=$_POST['haslo'];
  5.  
  6.  
  7. $connection = new mysqli($host,$db_user,$db_password,$db_name);
  8.  
  9. if($connection->connect_errno==0)
  10. {
  11.  
  12. $sql="SELECT * FROM konta WHERE Login='$user' AND Hasło='$password'";
  13.  
  14. if($result = $connection->query($sql))
  15. {
  16.  
  17. if($result->num_rows>0)
  18. {
  19. $row=$result->fetch_assoc();
  20.  
  21. $imie=$row['Login'];
  22.  
  23. echo "$imie dddaffffffffffffffffff" ;
  24.  
  25. $result->close();
  26. }
  27.  
  28.  
  29. }
  30. else
  31. {
  32. echo "Nie udało się połączyć z bazą" ;
  33.  
  34. }
  35.  
  36. }
  37. else{
  38.  
  39. echo"błąd";
  40.  
  41. }
  42. $connection->close();
  43. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement