Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if ( isset( $_POST[ 'submit' ] ) ) {
- $com = $_POST['txt'];
- If ($com === "") {
- echo "<font color=red><b>You must write something to post!</font></b>";
- die;
- }
- $time = gmdate("M d Y H:i:s",time()+(2*60*60));
- $com = $_POST['txt'];
- $count = strlen($com);
- $com = stripslashes($com);
- $breaks = array("<br />","<br>","<br/>");
- $com = str_ireplace($breaks, "rn", $com);
- $fp = $file = fopen( "NAME_OF_POST.php", "a");
- Multiple fwrites follows.....
- Multiple fwrites follows.....
- rewind($fp);
- fclose($fp);
- echo '<script type="text/javascript">window.location ="";</script>';
- }
- ?>
- <textarea name="txt" id="area" class="typo_vind" placeholder="......" tabindex="1"></textarea>
- $yourString = "text
- with
- enters";
- $result = nl2br( $yourString );
- print $result
- // output:
- // text<br>with<br>enters
- $breaks = array("n");
- $com = str_ireplace($breaks, "<br />", $com);
- $breaks = array("n");
- $com = str_ireplace($breaks, "<br />", $com);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement