Maybe a redirect in the emial code that takes you off the page before the database information is stored.
Most likely that is the issue. Make sure the redirect field is blank for any email, or other server behaviors besides the local checkout, or the last server behavior on the page.