mysql_fetch_row()
" Returns an array that corresponds to the fetched row, or FALSE if there are no more rows"
so, when you have
"SELECT COUNT(*), username ..."
the row/array has count(*) in the first position, hopefully with the value 1, i.e., 1 user found, and her username in the second position.
first position:
$row[0];
which is used in the if()
second position:
$row[1];
which is used to store the username in a session variable
Like I said, I assumesd that you have a column called username in this database.