Inserting an entire form into MySQL database
Don't take shortcuts. Build a proper insert statement using a parameterized query and validate each of the form inputs that they're also of the proper type (ie., not sending a string into an integer field). 

Do this to protect the integrity of your data, both from improper types and from malicious (or even unintended) attacks. 

See this and other related questions on SO for constructing proper parameterized queries with MySql.

More than that, you don't want your class that deals with data inserts to also interact with your UI. These concerns should be seperated. Seperate your UI code from your business logic code from your data access code. Don't let these things mingle, because your UI could change, your logic could change, and your data strategy could change, and they could change independently.