Hi, glad you got on at last.
I would use var_dump() to 'test' the value of things at certain places - you want to test that the login details are firstly submitted correctly (so use var_dump() after this line: if(isset($_POST["submit"])) { to dump out the values in the $_POST variable.
Something like this would be ok:
if(isset($_POST["submit"])) {
var_dump($_POST);exit;
that will dump the values in $_POST but only if it gets through that 'if' clause (ie if the submit post variable is set). If that DOES dump out the values in $_POST, then at least you know that the form is being processed correctly... and from there you know it must be a problem further down in that if block.
If the login does work OK, you're redirected to the members.php page - you do have that set up correctly? I suspect there's a problem there though because if the authentication is getting done properly, for some reason it's not redirecting to members.php, it's just reloading the same index.php page which it shouldn't be.
Check further on in the if block to see if the login worked ok:
if( !($row = checkPass($_POST["login"], $_POST["password"])) ) {
// login/passwd string not correct, create an error message:
$messages[]="Incorrect login/password, try again";
}
you could add a var_dump() after that to dump the contents of $messages to see if there's a problem there / if the $messages:
var_dump($messages);exit;