The Situation
I have an information request form on an html page. The form data is sent via the POST method to a php page for processing.
The Problem
I get an error for the variable $City, triggered by the fact that a character does not match one of the permitted characters. During testing, I did not input anything into the City input field. I can't figure out why my php script thinks it's getting an impermissible character.
Here is the html code for the form as it relates to the City input field:
Here is the php code in the page that processes the form data. This section of code is the first time the $City variable appears in the code.
Interestingly, I have nearly identical code for the $Address variable, which immediately precedes the $City variable in both the html form and the php processing page, yet I get
NO error from this script.
Here is the html code for the Address field:
And the php code relating to $Address, which comes just
BEFORE the $City variable:
I first noticed this error after I fixed a bug in my php code relating to conditionals in the php processing page, but that code appears
AFTER the $City variable code.
Any ideas?
(Thanks ahead of time for your help!)