Forum Moderators: coopster

Message Too Old, No Replies

allow html in form

html form php

         

sporb

8:33 pm on Jun 13, 2007 (gmt 0)

10+ Year Member



i want to allow users to use html in a form, but i worry about security, so i do not want them to post code that would allow their own javascript or php. is there a way to allow users to use html only?

coopster

3:13 am on Jun 14, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Sure, just edit check the POST data on the server side. You can remove any unwanted data using a number of available functions such as strip_tags [php.net], preg_replace [php.net], etc.