PHP Form/database integration

Hello,

I’m relatively new to PHP, and I’m trying to create a form in which saves two fields of information to either a database or just an external text file (preferably).

Can someone help me with the scripting? I havent been able to find anything concise, especially because I’m new at all of this.

Thank you,

R