I have controller that takes post parameters from HTML form, it will then send them to model that will insert the array into Cassandra database.
It is SQLInjection proof
This will output the same as $post_allowed. What it does is only allow the values in $post_input that are also present in $post_allow.
$post_allowed = ['parent_id', 'type', 'title', 'body', 'tags'];
$post_input = ['parent_id', 'type', 'title', 'body', 'tags', 'one', 'two', 'three'];
$post = array_intersect($post_input, $post_allowed);