This block of code can look confusing. Remember those variables I declared in the @db_fields area? Well, here they are put to use, such as $db_name (readable version) and $db_type, which determines the input type.