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. http://pastebin.com/UKq7q1GM Could someone please point me in the right direction?
I see. Should I change it to $_POST or remove it all together? Or does it need an else added to it? I did find errors in the validation checking part, where $aFailureNotices = array has the output for errors, some in there aren't in the $aFilters = array area
I changed it to if (count($_POST) <= 0) and now it seems to be working perfectly. I don't think I would have figured it out if you didn't point it out to me! Thank you very much!