Advertisement
Guest User

Untitled

a guest
Dec 10th, 2016
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. if (isset($_POST["login"])) {
  2.  
  3. $user_and_user=array(array('Marko'=>'Marko'),array('Milos'=>'123'),array('Jelena' => '321'));
  4.  
  5.  
  6. $greska3="Please enter a valid User name and password!";
  7. $greska4="Please fill in the blanks";
  8.  
  9. $user=$_POST["user"];
  10. $pass=$_POST["pass"];
  11.  
  12.  
  13. if (empty($user) && empty($pass)) {
  14. echo include "index.php",'<p style="color:red; font-size:25px; text-align:center;">'.$greska4.'</p>';
  15.  
  16. foreach ($user_and_user as $key => $value) {
  17.  
  18.  
  19. foreach ($value as $key2 => $value2) {
  20.  
  21.  
  22. if ($value[$key2]==$user && $value[$value2]==$pass) {
  23. echo include "kalkulator.php";
  24. break;
  25. }else{
  26. echo include "index.php",'<p style="color:red; font-size:25px; text-align:center;">'.$greska3.'</p>';
  27.  
  28.  
  29. }
  30. }break;
  31.  
  32. }
  33. }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement