How to send Form data to a MySQL database creater?

Ok… I have 4 php files:

 config.php
opendb.php
closedb.php
create.php

Now config holds all the MySQL connect data, opendb open the MySQL database, create puts the tables in the database, closedb closes the database.

What I want to know is what php file I add a form to and how do i do this:
A form with 4 inputs and a buttons (host, username, password and database) which will determine what details to use when loggin onto the MySQL db…

How will I do this?