Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.14 KB | None | 0 0
  1. <?php
  2. if ( isset( $_POST[ 'submit' ] ) ) {
  3. $com = $_POST['txt'];
  4. If ($com === "") {
  5. echo "<font color=red><b>You must write something to post!</font></b>";
  6. die;
  7. }
  8. $time = gmdate("M d Y H:i:s",time()+(2*60*60));
  9. $com = $_POST['txt'];
  10. $count = strlen($com);
  11. $com = stripslashes($com);
  12. $breaks = array("<br />","<br>","<br/>");
  13. $com = str_ireplace($breaks, "rn", $com);
  14. $fp = $file = fopen( "NAME_OF_POST.php", "a");
  15. Multiple fwrites follows.....
  16. Multiple fwrites follows.....
  17. rewind($fp);
  18. fclose($fp);
  19. echo '<script type="text/javascript">window.location ="";</script>';
  20. }
  21. ?>
  22.  
  23. <textarea name="txt" id="area" class="typo_vind" placeholder="......" tabindex="1"></textarea>
  24.  
  25. $yourString = "text
  26. with
  27. enters";
  28. $result = nl2br( $yourString );
  29. print $result
  30.  
  31. // output:
  32. // text<br>with<br>enters
  33.  
  34. $breaks = array("n");
  35. $com = str_ireplace($breaks, "<br />", $com);
  36.  
  37. $breaks = array("n");
  38. $com = str_ireplace($breaks, "<br />", $com);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement