Guest User

Untitled

a guest
Nov 21st, 2016
451
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.44 KB | None | 0 0
  1. <?php
  2.  
  3.     /* Recommend */
  4.     //$file = __DIR__.'/keys.txt';
  5.  
  6.     $file = "D:\Farm\Keys.txt";
  7.  
  8.     $message = 'Success';
  9.     $text = filter_input(INPUT_POST,'text');
  10.  
  11.     if (empty($text)) {
  12.         $message = 'Errror, text required!';
  13.     } else {
  14.         file_put_contents($nameFile,$text+"\n",FILE_APPEND);
  15.     }
  16. ?>
  17. <!DOCTYPE html>
  18. <html>
  19.     <head>
  20.         <meta charset="utf-8">
  21.         <title>Validation</title>
  22.     </head>
  23.     <body>
  24.         Status: <?=$message;?>
  25.     </body>
  26. </html>
Advertisement
Add Comment
Please, Sign In to add comment