ok i'm trying to at the moment compare a password with a textfile, here my code

PHP Code:
<?php
$user 
$_POST['username'];
$pass $_POST['password'];

$filecontents file('person.data');

if (
$pass == $filecontents[1])
{
echo 
"Welcome";
}
else
{
echo 
"Go away";
}


?>
but for some reason it allways says go away evan when i type the correct password in... any problems with my code? (i've only just got learning]