There are quite a few sites with examples which might be of use. The problem is that you are never going to find one which matches your needs, so you have to mix and match and adapt the scripts to your own purposes.
Creating the database part is easy. You can do that from the DreamHost ControlPanel under Goodies|Manage Mysql where you can create your database. You basically will have four bits of information The database name, the hostname (e.g. mysql.example.com or noodlesoup.example.com if you wish) the username (just for use with the database and not to be confused with an email username, although again it can be if you wish.)and lastly a password.
If you think of your program as being in three actions (which can be three PHP programs or one big whoppa PHP program). The actions being, the form, the database connection and the database options (Inputting, Selecting and so forth).
Once you get your head around that, it starts to look a bit better and you no longer wish John Wayne and his troop of cavalry would hurry up and arrive to help you out.
With that lot in mind search Google for ‘create form send database’ and you will see quite a few options. Have a look at http://www.business.aau.dk/evolution/projects/lamp/databases.html in particular. Do not panic at the mass of words just read through it and you will see there are some examples to try out.
Whatever the result there is no getting away from the fact that you will have to do some studying. So take the week-end off and read a few pages.
Opinions are my own views and are not the views of DreamHost.
Any advice offered by me should be acted upon only at your own risk.