note 38715 added to function.strip-tags
| From: | dewindj at student dot gvsu dot edu | Date: | Sun, 04 Jan 2004 18:28:40 +0000 |
| Subject: | note 38715 added to function.strip-tags | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-62898@lists.php.net to get a copy of this message | ||
It's quite useful for the most part, saves alot of time and effort trying to filter out tags. I
use it when users submit quotes from various people.
<?php>
$quotedName = strip_slashes($_POST['quotedName'],"");
$quote = strip_slashes($_POST['quoteEntry'],"");
$submitter = strip_slashes($_POST['submitter'],"");
echo '<p>'.$quotedName.'</p>';
echo '<p>'.quote.'</p>';
echo '<p>'.submitter.'</p>';
?>
Only difference with my code is it puts it into a database, but it's quite useful to stop
spammers.
----
Manual Page -- http://www.php.net/manual/en/function.strip-tags.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+38715
Delete -- http://master.php.net/manage/user-notes.php?action=delete+38715&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+38715&report=yes
Search -- http://master.php.net/manage/user-notes.php