Well - I aint gonna give you any code examples, but I will give you a bit of a pointer....
1, This is very basic PHP, and just requires you posting back to the page and capturing all the form data and saving to the database.
2, Javascript
3, Javascript
2 and 3 are both solved by writing out some Javascript on a successful page submission. You more or less want to do a window.opener.location.reload() and a window.close().
If you don't know much about JS, go find a good book on it )the O'Reilly series is pretty good), or you can probably find some sample scripts from javascript.com