Advertisement
Guest User

Untitled

a guest
Jan 24th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. <?php
  2. $myFile = "testFile.txt";
  3. $fh = fopen($myFile, 'a') or die("can't open file");
  4.  
  5. $date=$_POST['date'];
  6. $title=$_POST['title'];
  7. $author=$_POST['author'];
  8. //$content=$_POST['content'];
  9.  
  10. if ( isset( $_POST ) )
  11. $postArray = &$_POST ; // 4.1.0 or later, use $_POST
  12. else
  13. $postArray = &$HTTP_POST_VARS ; // prior to 4.1.0, use HTTP_POST_VARS
  14.  
  15. if ( get_magic_quotes_gpc() )
  16. $postedValue = htmlspecialchars( stripslashes( $postArray[editor]) ) ;
  17. else
  18. $postedValue = htmlspecialchars( $postArray[editor]) ;
  19.  
  20. fwrite($fh, $date);
  21. fwrite($fh, chr(31));
  22. fwrite($fh, $author);
  23. fwrite($fh, chr(31));
  24. fwrite($fh, $title);
  25. fwrite($fh, chr(31));
  26. fwrite($fh, $postedValue);
  27. fwrite($fh, chr(31));
  28. //fwrite($fh, "\n");
  29.  
  30. fclose($fh);
  31. header("location:login_success.php");
  32. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement