Not sure if this is PHP or HTML
Posted: Wed Apr 22, 2009 12:10 pm
I have created a page using a textarea to capture text that is sent via php (using 'POST') to a flat/.txt file which is then outputted by Flash. Got all that? : )
The problem that I'm running into is that the text is being relayed to the .txt file as double line spaced and thus displaying that way in the final Flash output.
My php reads
As mentioned previously, the HTML is a standard textarea, so I didn't feel the need to post that code here. The text file was created in BBEdit and saved as blog.txt.
Thanks in advance for suggestions -
sleepydad
The problem that I'm running into is that the text is being relayed to the .txt file as double line spaced and thus displaying that way in the final Flash output.
My php reads
Code: Select all
$evaluate=$_POST['evaluate'];
if($evaluate=="blogUpdate") {
$newFile=stripslashes($_POST['newBlog']);
$newFile = str_replace("\r", "\n", $newFile);
$open = fopen("blog.txt","w+");
$text="blog=".$newFile;
fwrite($open, $text);
fclose($open);
}
Thanks in advance for suggestions -
sleepydad