$tbl_name is undefined in your code.
in index.php the $myusername value won't alive, just the $_SESSION["myusername"]
session_register has used in php4 , in php5 lets use the $_SESSION where you add a value to a s. variable.
and start the session first, using start_session()...
check this query, the red value!
....WHERE username='bssa-$myusername' and ....
And do not use variables into an SQL query directly, lets santize it with
mysql_real_escape_string
better example for user and password check:
$query = sprintf("SELECT * FROM users WHERE user='%s' AND password='%s'",
mysql_real_escape_string($user),
mysql_real_escape_string($password));