Hide all your db related code,
Check : After click save button then your application goes to result page or blank page.
If you got blank page, then check your configuration.
Then you will do write further implementation code.
Here i give you one similar sample. I follow this technique
1. First you don't write any logic, Check your all configuration is correct .
That means, Either the success page is displayed or not, when click the save button
2. After that write your full logic.