MySql Invalid data entered in column field type is enum

I had created a form, but there is drop down menu its telling me Invalid data entered in column. I created table in SQL and used enum  as field type. Attached you will see main.sql file and folder with INDEX.php form.
Roger GillManagerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Nitin SontakkeDeveloperCommented:
There is no attachment.

A word SQL doesn't help much. Please be very specific. Microsoft SQL Server, MySQL, etc. Adding a version number helps even more.
PortletPaulEE Topic AdvisorCommented:
There is no attachment that I can see.

An "enum" restricts inputs to certain pre-defined values, so the error message is telling you that you are violating that restriction. Perhaps your php is returning the human readable "name" but it should be returning some "code value" that meets the enum restriction instead.

Please, also (as indicated above), tell us which database you are actually using.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Roger GillManagerAuthor Commented:
i apologize for no attachments, I just attached. Please review. Version information: 4.7.9, latest stable version: 4.8.3
Active Protection takes the fight to cryptojacking

While there were several headline-grabbing ransomware attacks during in 2017, another big threat started appearing at the same time that didn’t get the same coverage – illicit cryptomining.

Roger GillManagerAuthor Commented:
PHPmyAdmin Version information: 4.7.9, latest stable version: 4.8.3
PortletPaulEE Topic AdvisorCommented:
You query tells us it is MySQL, please use this as a topic in future because "SQL" does NOT tell us what we need to know. (Each database vendor has slightly different syntax.)
Chris StanyonWebDevCommented:
It's impossible to see from your code what you're actually trying to insert into the State column, but as has already been pointed out - it's an ENUM, so you can only insert one of the pre-defined Enum values. When you submit a form with a dropdown, it's the 'value' part of the dropdown that's submitted, so even though your form shows 'CA' as the selected option, we can't see what the related 'value' is:

<option value='xxx'>CA</option>

The value part has to be one of the allowed enum values.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.