as long as the checkout page is posting to the confirm page, this will be adding the information to the database.
Have you checked the database directly for the order? or are you just using the order History page.
there is no problem that I can see in the code that would cause the order not to be stored in the database. check the database directly to make sure.