hi, i have made a script that is ment to check if a string is equal to the contents of a text file. here is my code
i have not yet finnished my code but for some reason it echos the password which is not what i want it to do. i would like it to check if $pw is equal to the content of the text file. I think i may have the wrong function.PHP Code:<?
$uid = $_POST['uid'];
$pw = $_POST['pw'];
$file = fopen("D:/inetpub/xproot/users/lists/" . $uid . 'pw.txt','r');
if (fpassthru($file) == $pw)
{
//DO CODE FOR SUCCESSFULL LOGIN
} else {
//DO CODE FOR UNSUCCESSFULL LOGIN
}
?>




Reply With Quote