I'm having a problem with the if statement not working inside of a for statement.
Is there something I'm missing. <?php $auth = 'NO'; $user=$_POST['user']; $pass=$_POST['pass']; $move=($user.":".$pass); $filename = 'ADMIN/file.txt'; $fp = fopen( $filename, 'r' ); $file_contents = fread( $fp, filesize( $filename ) ); fclose( $fp ); $lines = explode ( "\n", $file_contents ); foreach ( $lines as $line ) { echo $line; echo " - "; echo $move; if ($move==$line) { echo "This is MOVE = "; $auth = 'YES'; break; } } ?> -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php