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
Use array intersection. array intersect, it will help you.