Hello all, I have a form page which submits to a PHP page. The latter creates a text file, but is escaping my strings for some reason.
Here is my form page:
Here is my processing page:Code:<form name="frmMain" action="write.php" method="post"> <textarea name="txtBody"></textarea> <input type="submit"> </form>
Now when I submit the following text:Code:<?php $filename = "output.txt"; $fp = fopen ($filename,"w") or die("Can't open file."); fwrite ($fp, $txtBody); fclose ($fp); ?>
bgcolor="#000000"
It comes out as:
bgcolor=\"#000000\"
Why is PHP escaping my strings? More importantly, how do I stop it?
Thanks!




Reply With Quote