Gath Posted August 22, 2007 Share Posted August 22, 2007 Hi. Is $reply_text = htmlentities ($reply_text, ENT_QUOTES); secure enough for a query? If not, why not? I'm not very good at security, and might be missing some obvious stuff... If it isnt, what i'm looking for is something that will secure the form (it's a message for a forum) but when showing it on a page, it comes out exactaly like it was typed. (pretty mutch like this forums ) Thank you. Quote Link to comment https://forums.phpfreaks.com/topic/66208-htmlentities-secure-enough-form/ Share on other sites More sharing options...
MadTechie Posted August 22, 2007 Share Posted August 22, 2007 but when showing it on a page, it comes out exactaly like it was typed. (pretty mutch like this forums ) try viewing the source of the online page. its pretty secure.. depends what of protection your after.. Quote Link to comment https://forums.phpfreaks.com/topic/66208-htmlentities-secure-enough-form/#findComment-331174 Share on other sites More sharing options...
Gath Posted August 22, 2007 Author Share Posted August 22, 2007 but when showing it on a page, it comes out exactaly like it was typed. (pretty mutch like this forums ) try viewing the source of the online page. its pretty secure.. depends what of protection your after.. Yes, i keep inputting all weird combinations of symbols and such, checked the page, and it comes out alright. What protection i'm after... hmm... well, to stop anything that could be done "against" the site/db, really sql injection, and anykind of 'exploit' to the code/db. Quote Link to comment https://forums.phpfreaks.com/topic/66208-htmlentities-secure-enough-form/#findComment-331184 Share on other sites More sharing options...
MadTechie Posted August 22, 2007 Share Posted August 22, 2007 yeah htmlentities should be fine try this $reply_text = 'Hello "world" that will be £1.99 please for Fish & chips'; $reply_text = htmlentities ($reply_text, ENT_QUOTES); echo $reply_text; it should view like this Hello "world" that will be £1.99 please for Fish & chips but if you "view source" it will show this Hello "world" that will be £1.99 please for Fish & chips Quote Link to comment https://forums.phpfreaks.com/topic/66208-htmlentities-secure-enough-form/#findComment-331258 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.