Avatar of Jack_son_
Jack_son_
Flag for Afghanistan asked on

PHP Web Form Question

For my web form, I have PHP using the Zend Framework, then i am using mysql for the db.  I have one field on the form where i need the application to output a better error message to the user if the data is entered incorrectly.  How can I add a custom error message to send to the user if their input on that field is wrong?
PHPMySQL ServerJavaScript

Avatar of undefined
Last Comment
Eddie Shipman

8/22/2022 - Mon
honestman31

You have to create a function to do that based on your requirements , for example if you are expecting  numbers then the user entered letters, you will need to use a function to verify that  ( you will need to use regular expression ) . and tell the user what mistakes they have done .
Ray Paseur

... I have PHP using the Zend Framework, ...
Maybe show us the URL of your test data and the PHP code that creates the response, thanks.
Lukasz Chmielewski

How do you handle the errors in the error controller with the form ?
What is the version of zf ?
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
ASKER CERTIFIED SOLUTION
Eddie Shipman

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.