Level 13
Have a look at this video
https://laracasts.com/series/lets-build-a-forum-with-laravel/episodes/101
1 like
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I am using trix editor to insert text in database and I am inserting data without filtering .. because filter data is removing the html content and I need this .....
How to make this process secure, I mean How to insert data in database with html in secure approch.
And how to get it back in secure
` // was using this but skip html
$title_ar = filter_input(INPUT_POST, 'title_ar', FILTER_SANITIZE_STRING);
$title_en = filter_input(INPUT_POST, 'title_en', FILTER_SANITIZE_STRING);
// now using this but not secure.
$desc_ar = addslashes($_POST['desc_ar']);
$desc_en = addslashes($_POST['desc_en']);
`
Please or to participate in this conversation.