# FLASH-\>PHP save HTML file, PHP adds "\\" in front of each ' or "

**URL:** <https://forum.kirupa.com/t/flash-php-save-html-file-php-adds-in-front-of-each-or/187332>\
**Category:** Uncategorized\
**Created:** [April 28, 2006, 11:33am UTC](https://forum.kirupa.com/t/flash-php-save-html-file-php-adds-in-front-of-each-or/187332 "2006-04-28T11:33:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![watcher](https://avatars.discourse-cdn.com/v4/letter/w/77aa72/32.png) [@watcher](https://forum.kirupa.com/u/watcher)\
**Post date:** [April 28, 2006, 11:33am UTC](https://forum.kirupa.com/t/flash-php-save-html-file-php-adds-in-front-of-each-or/187332/1 "2006-04-28T11:33:01Z")

</div>

Hi,

I want to load HTML into flash, modify it, save/update back to server using PHP.

Loading into flash works fine, saving it back thought not so well, because PHP adds in front of each " and ’ letter 1 slash (its like parsing has to be changed or smthng). I am using loadVars saveAndLoad to send data to php script and retrieve acknowledgement back from server.

PHP script is as follows:

```auto
<?php
 $filename = $_POST["filename"];
 $raw_html = $_POST["content"];
 
 print $raw_html;
 
 $fp = fopen($filename, "w");
 fwrite($fp, $raw_html);
 fclose($fp);
 ?>

```

where “filename” is the name of the HTML file that “content” has to be saved into; and “content” is updated HTML, which was updated inside flash and has to be saved back to server.

When i trace loadVars.content before sending it to PHP, it contains no additional slashes. Example:

```auto
<textformat leading="7"><p><br> &nbsp; &nbsp; Ka&#382;dá in&#353;trukcia je vykonávaná ako sekvencia krokov. Tieto kroky zodpovedajúce 1 in&#353;trukcii sa spolo&#269;ne nazývajú in&#353;truk&#269;ný cyklus.
  &nbsp; &nbsp; Ako taký in&#353;truk&#269;ný cyklus vyzerá, si uká&#382;eme na nasledujúcom príklade:
 <img src="swf/instruction_cycle.swf" width="300" height="350" hspace="120"></p></textformat>

```

Once PHP updates the document’s content, the HTML file looks as follows:

```auto
<textformat leading=\"7\"><p><br> &nbsp; &nbsp; Ka&#382;dá in&#353;trukcia je vykonávaná ako sekvencia krokov. Tieto kroky zodpovedajúce 1 in&#353;trugfdsgsdgkcii sa spolo&#269;ne nazývajú in&#353;truk&#269;ný cyklus.
  &nbsp; &nbsp; Ako taký in&#353;truk&#269;ný cyklus vyzerá, si uká&#382;eme na nasledujúcom príklade:
 <img src=\"swf/instruction_cycle.swf\" width=\"300\" height=\"350\" hspace=\"120\"></p></textformat>

```

You can see clearly, each time there was a " or ’ letter, PHP script added one \ in front of it. I guess its because how PHP interprets things inside “” or ‘’ and \ destroys its special meaning.  
Please gimme some advice how to tell PHP that i dont want it to place those slashes there. I have one guess… putting that HTML into XML CDATA node, which preserves the parsing, but HOPE there is another way to do this.

Thank You for Your caring and help  
M
