RE: [PHP] Re: strip HTML
| From: | Jack Dempsey | Date: | Sat, 20 Oct 2001 19:44:18 +0000 |
| Subject: | RE: [PHP] Re: strip HTML | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-71700@lists.php.net to get a copy of this message | ||
once you get the data in your update.php file, do this
$stripped = strip_tags($data_field_name);
you can also specifiy tags to be left in.....read the website page for more
info
jack
-----Original Message-----
From: Gary [mailto:gbland@worldnet.att.net]
Sent: Saturday, October 20, 2001 3:49 PM
To: php-general@lists.php.net
Subject: [PHP] Re: strip HTML
Thanks James:
I had figured that part out (should of said so). What is happening is
a form is passing the stuff to another page that does the DB UPDATE. The
form action is
<form name=\"cform\" method=\"post\" action=\"update.php\">.
Where I am lost is where to put the strip_tags() like
action=strip_tages("update.php");
Gary
Yz James wrote:
> The easiest way would be to use strip_tags(), though you could craft your
> own regular expression.
>
> http://www.php.net/strip_tags
>
> James
>
> "Gary" <gbland@worldnet.att.net> wrote in message
> news:3BD1C2D9.4000100@worldnet.att.net...
>
>>Hello All,
>> How would I strip all HTML before the info in inserted to MySQL? The
>>info is sent with a form. We Have one person that insist on using HTML.
>>
>>TIA
>>Gary
>>
>>
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net