Form field validation against a MySQL...

User 360710 Photo


Registered User
24 posts

Is it possible to validate a field on a form against an existing number in a MySQL database and return an error if there is no match?
User 187934 Photo


Senior Advisor
20,170 posts

Yes you can do this but you'll need to alter your form a little.
Here's validating an email address.:cool:
Validate email
Submit an email address then come back and try it again or try entering you@me.com
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 360710 Photo


Registered User
24 posts

This is exactly what I'm looking for. Will you share the code or procedure for making this work?
User 187934 Photo


Senior Advisor
20,170 posts

I put the instructions on there and converted it to number validation for you.;)
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 360710 Photo


Registered User
24 posts

That is awesome of you to be so helpful. I will dig into this soon. Thanks again.
User 2291589 Photo


Registered User
1 post

User 320247 Photo


Registered User
68 posts

Kenneth White wrote:
http://ericrohloff.com/coffeecup/ccforum/formbuilder/form_validation_mysql/mysqlvalidation/

This link does not work.


Just tried it and it is working for me....
User 2147626 Photo


Ambassador
2,958 posts

Me too! Um, what browser are you trying Kenneth? I used Chrome and it opened just fine.
Graphics for the web, email, blogs and more!
-------------------------------------
https://sadduck.com
User 2736027 Photo


Registered User
68 posts

Re-visiting an old thread...
I can load Eric's 'validate email' form (above), but it appears that the form is no longer active?

I would like to be able to validate 'either' a member's email address against a table in a mysql database, or a their 'First' and 'Last' name. My preference would be by name, if possible.

What changes would I need to make to the script?
Thanks
User 122279 Photo


Senior Advisor
14,439 posts

As you are aware, this is an old thread. It might well be that we don't keep stuff made up for this forum for 10 years.
Ha en riktig god dag!
Inger, Norway

My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com



Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.