The user (or bot) is automatically sent to the form if no $_POST variables exist. Secondly, you can check for the existence of specific values prior to assigning them to global variables. It is wise to combine these two checks, and to assign a NULL value to anything that hasn't been filled-in on the form: