Step one, read the PHP manual.
It is full of examples of fetching data from a form, and storing it in a database.
Next, look at this very forum.
Many peolple have had the same questions (over and over again) so that might be of great help.
Also, check out the columns as they contain lots of knowledge from the "experts" :-)