You are missing mysql_fetch_array()
call.
$sql = "SELECT * FROM $tbl_name WHERE username='$myusername' and password='$mypassword'";
$result = mysql_query($sql);
$row = mysql_fetch_array($result);
After that you can access $row
array; to see its contents use:
print_r($row);
To access specific field, use $row['fieldname']