?
Solved

PHP Web Form Question

Posted on 2012-12-26
4
Medium Priority
?
283 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This post contains step-by-step instructions for setting up alerting in Percona Monitoring and Management (PMM) using Grafana.
In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
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

766 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