Hi, I have problem in inserting,is it possible to insert in more than one table?

for example i have a form with 3 fields now when i am going to submit this form,the 3 fields will be inserted into three different table...


firstname "jemz"====>will be inserted to first table
middlename "chan"====>will be inserted to second table
lastname "gimz"=====>will be inserted to third table

I don't know how to do it in php code,can you please help me.

Thank you in advance.