# Saving to a .txt includes html tags?

**URL:** <https://forum.kirupa.com/t/saving-to-a-txt-includes-html-tags/258900>\
**Category:** Uncategorized\
**Created:** [April 29, 2008, 11:53am UTC](https://forum.kirupa.com/t/saving-to-a-txt-includes-html-tags/258900 "2008-04-29T11:53:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![thecheez](https://avatars.discourse-cdn.com/v4/letter/t/b3f665/32.png) [@thecheez](https://forum.kirupa.com/u/thecheez)\
**Post date:** [April 29, 2008, 11:53am UTC](https://forum.kirupa.com/t/saving-to-a-txt-includes-html-tags/258900/1 "2008-04-29T11:53:03Z")

</div>

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:

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

```

The save.php file is as follows:

```auto
<?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
