Thank you, kind sir, that makes a lot of sense. The one question I have is, is $_POST['submit'] a fictional variable? I've examined the $_POST array in the past and never seen that.
It's what you get by giving a name (of "submit") to your submit button - since pretty much all forms have a submit button, it's a simple/consistent way to say "has the form been submitted".