Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- </head>
- <body>
- <form method="post">
- <fieldset style="border:solid 1px black; width:317px">
- <br>
- Nazwa użytkownika:<input style="margin-left:6px;" type="text" name="n"></input>
- <br>
- Login:<input style="margin-left:99px;" type="text" name="a"></input>
- <br>
- Hasło:<input style="margin-left:100px;" type="text" name="b"></input>
- <br>
- <br>
- <input style="margin-left:100px;" type="submit" name="c" value="Wyślij">
- </fieldset>
- </form>
- <?php
- if(isset($_POST['a']))
- { $w=$_POST['a'];}
- if(isset($_POST['b']))
- { $q=$_POST['b'];}
- if(isset($_POST['n']))
- { $m=$_POST['n'];}
- $nazwa=fopen('C:\xampp\htdocs\nazwa.txt','r');
- $line = trim(fgets($nazwa));
- $arr = explode(";", $line);
- if($arr[0]==$w && $arr[1] == $q) {echo "that's good"; }
- else{ echo "that's bad";}
- fclose($nazwa);
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement