LiveWire Network Peer Answers Peer Support Teen Forums Tech Forums College Forums 266 users online 186645 members 177 active today Advertise Here Sign In
TeenCollegeTechPhotos | Quizzes | LiveSecret | Video | Dictionary | News | FAQ
You have 1 new message.
Emergency Help
Until you sign up you can't do much. Yes, it's free.

Sign Up Now
Membername:
Password:
Already have an account?
Invite Friends
Active Members
Groups
Contests
Moderators
5 online / 9 MPM
Fresh Topics
  LiveWire / 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
Welcome to LiveWire!
We're Stronger Together.
Join the Community
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 | 167 Days Active
Join to learn more about Mediocre Czech Republic | Male | 1341 Posts | 3088 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

Quick Reply

You are signed in as our guest.

Looking for something else?
 

  LiveWire / Technical Forums / Programming & Application Development / Viewing Topic