Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE HTML>
- <html>
- <head>
- <meta charset="utf-8">
- </head>
- <body>
- <form method="post" action="spr1.php">
- Nazwisko: <input type="text" name="nazw"/> PESEL: <input type="text" name="PESEL"/> <button type="submit"> Wyślij </button>
- </form>
- <?php
- if(!(file_exists('baza.txt'))){
- $plik = fopen("baza.txt","w+");
- fwrite($plik,"");
- fclose($plik);
- }
- $plik = fopen("baza.txt","a+");
- $wpis = "\r\n".$_POST['nazw']." ".$_POST['PESEL']."";
- fputs($plik,$wpis);
- fclose($plik);
- ?>
- <b> Nazwisko </b> <b> PESEL </b> </br>
- <?php
- $plik = fopen("baza.txt","r");
- while(!(feof($plik))){
- $linia = fgets($plik);
- echo $linia."</br>";
- }
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement