your error message says to look at line 24, in which you find this:
$_SESSION['userName'] $row['pass'];
which isn’t a valid statement. It should probably be
$_SESSION['userName'] = $row['pass'];
although I would not store a password in a session (session data might be stored in a shared temporary directory).
Please also note that your code is extremely vulnerable to SQL injection. Read up on prepared statements, and don’t use mysql_
which is deprecated since 2013. Use mysqli_
or PDO
instead.
Additionally, for real-world code, you should hash your passwords when storing them.