yes. your posted variables go to the targeted script in your form action. That's the only place they go to. therefore, your targeted script already checks to see if they are there, etc.. just add those 2 lines of code afterwards, just like i showed you.
as far as your proper syntax thing... session_start() should only be used once, at the beginning of your script. If you are already checking for $_SESSION['loggedin'], then you presumably should aready have session_start() some place near the top already.
also, using session_register is a deprecated way of doing sessions. instead, use
$_SESSION['memberid'] = $results['memberid'];
and then when your header redirects to members.php, you can do this:
$memberid = (isset($_SESSION['memberid'])) ? $_SESSION['memberid'] : NULL;
that way you will have your $memberid variable as an easier variable to play with. Just remember though, if you wanna do it that way, before you go to some other page, always go back and assign whatever you have in $memberid back to the session variable like so:
$_SESSION['memberid'] = $memberid;
presumably your memberid won't be changing, so this probably won't be necessary, but keep that in mind if you are going to have other session variables that will be changing.