Hi, I'm switching from one user system to another. I want existing members (about 100) to re-register... so what I want to do is have my login script check a txt file with the usernames of my existing members (one on each line), and if $_POST['uname'] equals one of the names in the text file, a message to say "Please re-register, blah blah." So I'm guessing I need to somehow get the names from the text file into an array and have it check the array. Any help on this please? This is what the login function looks like...
$user = new flexibleAccess();
if ( isset($_POST['uname']) && isset($_POST['pwd'])){
if ( !$user->login($_POST['uname'],$_POST['pwd'],$_POST['remember'] )){
echo 'Wrong username and/or password';
}else{
//user is now loaded
header('Location: http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']);
}
}
Thanks for the help 🙂
Edit: And now that I just thought about it, I'll need to remove the username from the txt file after it gives this message, heh.