Jump to content

[SOLVED] strip_tags help please!


tpl41803

Recommended Posts

Hey everyone

 

this is a pretty basic function but I can't seem to get it working right.

 

I'm setting up a small form which allows users to input information (name, email address, etc... and a short message). My script writes this info to a flatfile database.

 

I'm using strip_tags() to make sure no strange things happen in the code. right now My code looks like this

 

$copy = "\n$name|$email|$validurl|$response|$date|$link|$quoted|";
$text = strip_tags($copy, '<i><b><br />');

 

from what I understand all tags except <i><b>and<br /> will be removed, but right now it's still stripping these three tags from my string

 

any help please??

 

i'm kind of new to php, I know this is a simple issue I just cant wrap my head around it

Link to comment
https://forums.phpfreaks.com/topic/160964-solved-strip_tags-help-please/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.