I have written a validation script that has sessions in the header file to keep data in the fields if there is any incorrect info in the form. The issue that I am having is upon successful submission the form will first post a blank entry in the database, then one with all of the info, and then another blank one. I have looked through the code multiple times and am not sure what is causing the issue.
It also appears that when validation fails, the form still submits a set of blank info into the database.
[PHP] if then - Pastebin.com
Could someone please point me in the right direction?