Edit: Fixed with http://ca3.php.net/manual/en/security.magicquotes.disabling.php
I'm using fread to insert the contents of a given file into a textarea. Like this:
| Code: |
$handle = fopen($filename, "r"); $contents = fread($handle, filesize($filename)); echo "<textarea>".$contents."</textarea> |
The problem is that when I submit textarea, php sends it with backslashes before any quotation marks in $content. and escapes other backslashes, etc. For example,
| Code: |
| echo "<div style=\"text-align:right;\" id=\"header\"> |
becomes
| Code: |
echo \"<div style=\\\"text-align:right;\\\" id=\\\"header\\\"> |
I need to keep baskslashes etc. from the original file, and not send the new ones. How do I do this?
Post edited at 6:52 pm on Aug. 10, 2008 by Mediocre
-------
Incest and bestiality are neat.