tpl41803 Posted June 4, 2009 Share Posted June 4, 2009 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 Quote Link to comment Share on other sites More sharing options...
Ken2k7 Posted June 4, 2009 Share Posted June 4, 2009 Here's a similar situation - http://www.phpfreaks.com/forums/index.php/topic,254647.msg1199386.html#msg1199386 Just modify that a bit. Quote Link to comment Share on other sites More sharing options...
gevans Posted June 4, 2009 Share Posted June 4, 2009 Change <br /> to <br> (regardless what's in your string). Apart from that, view source to check it's there, should work fine. Output the string before and after formatting to confirm changes Quote Link to comment Share on other sites More sharing options...
tpl41803 Posted June 4, 2009 Author Share Posted June 4, 2009 duh thanks so much gevans i knew it would be something simple like that, i dont know why i didnt try that thanks again :_D Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.