There is a great PHP tutorial at W3C's website, check it out.
If I got you right, you'll want to use only one page -- testme.php, if you like. Make it contain both the processing code and the form, so that the form's action is the php file itself; this way the content is displayed on the very same page. Just make a "selection" in the php code (using if..else, for example) so that based on some condition (like if something was received via POST/REQUEST that means the form was submitted) the results are shown, and in the other case (form was not submitted) the form is displayed instead. There's an example of this sort of function in the tutorial I mentioned.