It is not duplicate post since I escape the form using htmlspecialchars() to clean the submitted form and the active records from CodeIgniter are escaping all the quotes. The error Is not one from Database, it is a block from the server when I try to send the form.
I am having a form that will submit data to a PHP page which then will be submitted into the database. My problem is that I might want to store the script for Google Analytics, or for example some HTML meta that will need to be generated automatically from the database.
Let's say I want to send this code FROM HTML form to a PHP page then to insert into the database.
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-11111-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-111111-1');
</script>
I get a 403 error from the server, how can I sanitize or make it safe when the server is processing my form?