Advertisement
Guest User

Untitled

a guest
Nov 13th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. <html>
  2. <head>
  3. </head>
  4. <body>
  5. <form method="post">
  6. <fieldset style="border:solid 1px black; width:317px">
  7. <br>
  8. Nazwa użytkownika:<input style="margin-left:6px;" type="text" name="n"></input>
  9. <br>
  10. Login:<input style="margin-left:99px;" type="text" name="a"></input>
  11. <br>
  12. Hasło:<input style="margin-left:100px;" type="text" name="b"></input>
  13. <br>
  14. <br>
  15. <input style="margin-left:100px;" type="submit" name="c" value="Wyślij">
  16. </fieldset>
  17.  
  18. </form>
  19.  
  20. <?php
  21.  
  22. if(isset($_POST['a']))
  23. { $w=$_POST['a'];}
  24.  
  25. if(isset($_POST['b']))
  26. { $q=$_POST['b'];}
  27.  
  28. if(isset($_POST['n']))
  29. { $m=$_POST['n'];}
  30.  
  31. $nazwa=fopen('C:\xampp\htdocs\nazwa.txt','r');
  32. $line = trim(fgets($nazwa));
  33. $arr = explode(";", $line);
  34.  
  35.  
  36. if($arr[0]==$w && $arr[1] == $q) {echo "that's good"; }
  37. else{ echo "that's bad";}
  38.  
  39. fclose($nazwa);
  40.  
  41. ?>
  42. </body>
  43. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement