I bought the game online and when I try to log in it says I don't have a diablo 3 attached to my account. How do play the game if I bought it online?
So you're launching the game and trying to log in? If so, you need to realize that the game is not open for play yet (you can't log in). It will be ready to play at 12 AM Pacific time (5 1/2 hours from the time of this post).
You are probably trying to log in to a EU or Asian region using a US copy of the game. Global play is not enabled at this time so you have to wait for the US server launch tonight.