note 73658 added to function.stripslashes
| From: | JABCreations at osu1 dot php dot net | Date: | Tue, 06 Mar 2007 04:49:06 +0000 |
| Subject: | note 73658 added to function.stripslashes | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-124133@lists.php.net to get a copy of this message | ||
When writing to a flatfile such as an HTML page you'll notice slashes being inserted. When you
write to that page it's interesting how to apply stripslashes...
I replaced this line...
<?php fwrite($file, $_POST['textarea']); ?>
With...
<?php if (get_magic_quotes_gpc()) {fwrite ($file,
stripslashes($_POST['textarea']));}?>
You have to directly apply stripslashes to $_POST, $_GET, $_REQUEST, and $_COOKIE.
----
Server IP: 216.194.113.175
Probable Submitter: 68.56.173.233
----
Manual Page -- http://www.php.net/manual/en/function.stripslashes.php
Edit -- https://master.php.net/note/edit/73658
Del: integrated -- https://master.php.net/note/delete/73658/integrated
Del: useless -- https://master.php.net/note/delete/73658/useless
Del: bad code -- https://master.php.net/note/delete/73658/bad+code
Del: spam -- https://master.php.net/note/delete/73658/spam
Del: non-english -- https://master.php.net/note/delete/73658/non-english
Del: in docs -- https://master.php.net/note/delete/73658/in+docs
Del: other reasons-- https://master.php.net/note/delete/73658
Reject -- https://master.php.net/note/reject/73658
Search -- https://master.php.net/manage/user-notes.php