You have to append your username to your database when asked of it. For example, if I had a databased called phpbb, it would actually be wizard_phpbb. The same applies to users.
You should also double check your php code with a php forum. They most likely know more than we do about php and will be able to help you debug it.