# Problem writing to a file

**URL:** <https://forum.kirupa.com/t/problem-writing-to-a-file/168026>\
**Category:** flash\
**Created:** [November 3, 2005, 9:55am UTC](https://forum.kirupa.com/t/problem-writing-to-a-file/168026 "2005-11-03T09:55:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![superprg](https://avatars.discourse-cdn.com/v4/letter/s/858c86/32.png) [@superprg](https://forum.kirupa.com/u/superprg)\
**Post date:** [November 3, 2005, 9:55am UTC](https://forum.kirupa.com/t/problem-writing-to-a-file/168026/1 "2005-11-03T09:55:53Z")

</div>

I have my XML file in this format  
\<productvals tinterval=“20” \>  
\<set name=“San” value=“65” /\>  
\</productvals\>

I want to overwrite this file each time in flash  
I tried but got problem in double quotes and new line  
How can I overcome them?  
var fileContents = “\<productvals tinterval=”;  
fileContents=fileContents+tinterval;

I just want to know if it would be possible to write the whole file in one go and what should be the content of fileContents variable which I am writing to the file using php  
loadVarsText.load("\<A href=“[http://localhost/writeFile.php?&stuffToWrite="+fileContents"](http://localhost/writeFile.php?&stuffToWrite=%22+fileContents%22)\>[http://localhost/writeFile.php?&stuffToWrite=](http://localhost/writeFile.php?&stuffToWrite=)”+fileContents);  
Thanks!
