Advertisement
gabrielaozegovic

grdinic1

Dec 11th, 2017
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. <?php
  2.  
  3. $link = mysqli_connect("localhost", "root", "vertrigo");
  4.  
  5. if(!$link){
  6. die("Ne mogu se spojiti na MySQL posluzitelj" .
  7. mysqli_error());
  8. }
  9.  
  10. $db_selected = mysqli_select_db($link, "prezime");
  11.  
  12. if (!$db_selected){
  13. die("Ne mogu selektirati navedenu bazu. " .
  14. mysqli_error());
  15. }
  16.  
  17. $result = mysqli_query( $link, "SELECT * FROM korisnik");
  18.  
  19. while ($row = mysqli_fetch_array($result, MYSQLI_BOTH)) {
  20. if($row["email"] == $mail && $row["lozinka"] == $password ){
  21.  
  22. $uspjeh = "radi";
  23.  
  24. }
  25. }
  26.  
  27.  
  28. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement