سؤال

I have section on my site where users can submit code. I want to safely store to the database.

I am using php. I tried using html purifier to save data to the database, but it removes all the code.

I appreciate any help.

Thanks.

هل كانت مفيدة؟

المحلول

When you save to the database using cakephp's save method, you are automatically protected from SQL injection.

Useful Link:

http://nuts-and-bolts-of-cakephp.com/2009/08/06/save-now-sanitize-later/

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top