Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

PHP Web Form Question

Posted on 2012-12-26
4
Medium Priority
?
284 Views
Last Modified: 2013-01-13
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?
0
Comment
Question by:Jack_son_
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 10

Expert Comment

by:honestman31
ID: 38722643
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 .
0
 
LVL 111

Expert Comment

by:Ray Paseur
ID: 38722650
... 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.
0
 
LVL 27

Expert Comment

by:Lukasz Chmielewski
ID: 38723484
How do you handle the errors in the error controller with the form ?
What is the version of zf ?
0
 
LVL 26

Accepted Solution

by:
EddieShipman earned 2000 total points
ID: 38755317
Personally, I'd handle validation on the client side using jQuery ValidationEngine plugin:
https://github.com/posabsolute/jQuery-Validation-Engine

Very easy to use and the form does NOT have to be submitted for validation to occur. Validation rules can also be written to use ajax calls to test server side validation such as account existance, etc.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
This post contains step-by-step instructions for setting up alerting in Percona Monitoring and Management (PMM) using Grafana.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question