Results 1 to 14 of 14

Thread: <resloved>check if string is equal to what is in a text file

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member dandono's Avatar
    Join Date
    Aug 2004
    Location
    Cornwall, UK
    Posts
    485

    Resolved <resloved>check if string is equal to what is in a text file

    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
    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
    }
    ?>
    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.
    Last edited by dandono; May 14th, 2005 at 03:31 AM.
    If there is only one perfect person in the universe, does that make them imperfect?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width