It goes like this.
If the method of your login form is POST all the variables or the data on input fields can be accessed on $_POST array. Use the name of the field as the index.
for example, you have the form:
<form method="POST" action="somescript.php">
<input type="text" name="password">
<input type="submit" value=" LOGIN ">
</form>
once the submit button is clicked. the text inputted by the user is can be accessed on $POST["password"]. There are other arrays also like $GET, for forms with method get and variable passed on the URL. There is also $REQUEST which is a mixture of all $POST and $GET and even $FILES. $_FILES is an array which contain file uploads.
Now, if you have register_global on, you dont need to type $FILES, $POST, $GET or $REQUEST anything passed to the phpscript via GET or POST is automatically created a global variable. For example for the form above, you can access the password passed by just $password.
Now register_globals on is a very bad practice. It can create conflict between the variables you created and the globals that PHP created. so to be sure just use $FILES, $POST, $GET and $REQUEST to access the variable passed.
And also you may want to do this parse the contents of the user flat file.
$temp = preg_replace("/\r/", $data);
$values = explode("\n", $temp);
Maybe the separator of the data is not really "/r/n" maybe it just \n. the code above first removes all the \r and explodes it using only \n as a separator.
Hope this helps...