select id from database, so there's no $row['active']. Change $row['active'] to $row['id'].
And do not use session_register("myusername"); Use $_SESSION['myusername']=="something"
You could change your query to select id,username ... and then set $_SESSION['myusername']=$row['username'];
Ofcourse this method is not good, but for a beginner it should do it;
You can also try out with the below link, it may help you:
Hope this helps.