Reply
Help with checkboxes and mysql queries
Old 07-05-2004, 06:35 PM preventing html in forum posts
Junior Talker

Posts: 4
Does anyone know fo an easy way to prevent people from inputting html into a form. I dont mean in the text box, but just a way to check for it and stop the script. I dont want people including html tags in their posts that could be any type of security threat or anything, but I would like them to be able to use certain text formatting tags. Thanks

Last edited by soccerworld5 : 07-05-2004 at 08:44 PM. Reason: solved problem, ran into another, changing question
soccerworld5 is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Old 07-05-2004, 10:17 PM
cmonkey's Avatar
Ultra Talker

Posts: 268
you could just apply the htmlspecialchars function to what they input, it won't stop the script but it will keep the html tags from displaying as html. you can get more info at http://www.php.net
cmonkey is offline
Reply With Quote
View Public Profile
 
Old 07-05-2004, 10:24 PM
Junior Talker

Posts: 4
Thanks a million. I have trouble finding those nice little tags on php.net sometimes, and my php book just plain sucks
soccerworld5 is offline
Reply With Quote
View Public Profile
 
Old 07-06-2004, 12:16 AM
cmonkey's Avatar
Ultra Talker

Posts: 268
no problem, that's what we're here for, if you're looking for a good PHP/MySQL reference book, check out PHP and MySQL Web Development by Luke Welling and Laura Thomson.
cmonkey is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Help with checkboxes and mysql queries
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.12224 seconds with 12 queries