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? 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! 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 :) 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 Link to comment https://forums.phpfreaks.com/topic/15412-no-html-or-js/#findComment-62492 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.