Umm would this work?
if (!isset($submit))
{
//print the normal page
//with form values and submit button named submit.
}
else
{ //it has been submitted
//check to make sure values ect are
// ok
//Do email stuff
//print "Thank you for submiting";
/* or try like
<BODY onload="window.close();">
</BODY>
//I dont remember the exact JS but
something like that
/*
}
This isnt' the best way to go, but its easy, and this should get you started.