If statement inside of for statement

From: Date: Mon, 10 Feb 2003 03:04:16 +0000
Subject: If statement inside of for statement
Groups: php.windows 
Request: Send a blank email to php-windows+get-18422@lists.php.net to get a copy of this message
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; } } ?>

« previous php.windows (#18422) next »