Saving to a .txt includes html tags?

Hey all,

Hopefully someone has come across something like this before and may be able to forawrd me onto a solution. I’ll try to explain what i’ve done best i can:

I’m trying to save the contents of an input text box to a an external .txt file so it can be dynamically loaded back in on another part of the site. I’m using PHP and I have it working however when it saves, the .txt file not only includes the text but a complete set of html formatting tags? How do i get rid of them??

The input box (var: editorText) is in a movieCilip (editor) called by the send button with the code:

on (release) {
    editor.loadVariables("save.php","POST");
}

The save.php file is as follows:

<?php
$myFile = "testFile.txt";
$fh = fopen($myFile, 'w') or die("can't open file");
$stringData = $_POST["editorText"];
fwrite($fh, $stringData);
fclose($fh);
?>

Anyone had this happen before? Anyone overcome this or have any suggestions how to? Please any help gratefully received,

Thanks in advance, Mike