Processing forms with php to wordpress database

I’m pretty sure you don’t quote the $variable at all when doing a query with wpdb.

So 'association_first_name' => '$legalname' would be 'association_first_name' => $legalname

But that might not solve all your problems.