Tandem Posted July 23, 2006 Share Posted July 23, 2006 Whats the best way to make html or javascript not work on a user input page like a guestbook? Quote Link to comment https://forums.phpfreaks.com/topic/15412-no-html-or-js/ Share on other sites More sharing options...
wildteen88 Posted July 23, 2006 Share Posted July 23, 2006 Use mysql_real_escape_string or strip_tags to stop HTML beeing added. Also make sure you are validating user input too! Dont just use raw POST data! Always validate user data! Quote Link to comment https://forums.phpfreaks.com/topic/15412-no-html-or-js/#findComment-62469 Share on other sites More sharing options...
Tandem Posted July 23, 2006 Author Share Posted July 23, 2006 Ok thankyou :) Quote Link to comment https://forums.phpfreaks.com/topic/15412-no-html-or-js/#findComment-62470 Share on other sites More sharing options...
kenrbnsn Posted July 23, 2006 Share Posted July 23, 2006 You can also use htmlentities() which causes to tags to be displayed, not interpreted.Ken Quote Link to comment https://forums.phpfreaks.com/topic/15412-no-html-or-js/#findComment-62492 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.