I'm not sure I fully understand.
You want to have a form and then have the PHP take in the information in each field of the form and do something with the info? Am I close?
To submit and collect info you would first make a form.
<input type="text" name="user">
<input type="password" name="pass">
<input type="submit" value="submit">
Then you use PHP to collect the info, and do something with it.
$username = $_POST['user'];
$password = $_POST['pass'];
Am I way off from what you want?
Of course there is a lot more too this. You'd want to check if the form actually submitted and several other things.