Function for dynamic php-mysql prepared statement insert query in a procedural way