PeopleGalleryZombiesFrolfProf ReviewsDictionaryBuy/SellForumsMovies

Sign In | Join


  » DormWire / Technical Forums / Programming & Application Development / Viewing Topic

Backslashes being inserted in php-called content of textarea
Replies: 3Last Post Aug. 10 6:14pm by I am next

(+) New Topic   (+) New Poll (+) Add Reply
Single page for this topic Email Print Favorite
( Mediocre )


Dairy Product Addict
Reply
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.


6:08 pm on Aug. 10, 2008 | Joined Nov. 2007 | 159 Days Active
Join to learn more about Mediocre Czech Republic | Male | 1217 Posts | 2848 Points
Post from this position was omitted due to content violations
Post from this position was omitted due to content violations
Post from this position was omitted due to content violations
Single page for this topic Email Print Favorite
(+) New Topic   (+) New Poll (+) Add Reply

Quick Reply

You are signed in as our guest.

Looking for something else?
 

  » DormWire / Technical Forums / Programming & Application Development / Viewing Topic



  © 2008 DormWire | Custom Web Hosting | Terms of Use | Site Map | Contact | FAQ