Choose your database:
AnySQL
MySQL
MS SQL Server
PostgreSQL
SQLite
Firebird
Oracle
SQL Anywhere
DB2
MaxDB

Subscribe to our news:
Partners
Testimonials
Ananda Theerthan J: "I have been looking for PHP generator for years and now I am happy that I found one. Yes, its the PHP generator for MySQL. I completely rate 10/10 for this product for making life easier. It has lot of features and capabilities especially the CRUD, lookups and data partitioning. I love this product and recommend to others".
David Lantz: "Thank you, this is by far the simplest, and most friendly utility for building db record system I have ever used. I wish I could get my systems guys at the office to purchase this for our company would be so very helpful and speed up a lot of work. I for one have used it for everything from a simple inventory record of my house, to a members record for my church just little pet projects and a test bed to test my own db builds and theories before having to hand code at the office..... it is a lot of fun to work with".

More

Add your opinion

PHP Generator for MySQL online Help

Prev Return to chapter overview Next

Data Validation

Data validation is intended to provide certain guarantees for accuracy and consistency for any of various kinds of user input. PHP Generator for MySQL allows you to check for correctness of input data on the client side and on the server side as well.

 

Client-side data validation

This type of data validation refers to validation performed on the client side. That is, it's performed on the client's, also known as the user's, computer. This type of validation checks the input information before it gets to the server. It has following advantages:

 

Reducing the amount of traffic to and from your web server since the data doesn't have to travel to the server before it gets checked (server-side data validation). If an error is found in the data in the server-side validation, the error must travel back to the user, who then corrects the problem and resubmits the data. This back-and-forth traveling can eat up precious bandwidth.

 

Saving processing time on the server by ensuring that data is clean and clear before it gets to your database.

 

Giving immediate feedback to your users since the processing is performed in their browsers. The user doesn't have to wait for the data to travel to the server to be checked and a response to be sent. They know immediately whether they need to tweak the information they have entered.

 

PHP Generator for MySQL allows you to implement the client-side data validation on two levels: when a user leaves a certain control and when a user submits a form.

 

To enable validation of data entered in a control, specify the appropriate Client validator.

Range

The generated script validates if number is between the largest and smallest values.

Length range

The script validates if the length of text is between the min length and the max length.

Email

The script makes the element require a valid email.

Credit card

The script makes the element require a credit card number.

Number

The script makes the element require a decimal number.

URL

The script makes the element require a valid URL.

Digits

The script makes the element require digits only.

Regular expression

You can also specify your regular expression for data validation. Such expression is a pattern and every character entered in a form field is matched against that pattern – the form can only be submitted if the pattern and the user-input matches.

 

To implement data validation on submitting a form, use the OnInsertFormValidate and OnEditFormValidate client side events. It may be helpful to check the compatibility of input data. When a user clicks the Save button, Javascript ensures that the data conforms to specifications before moving on the server.

 

Server-side data validation

This type of data validation consists of validating user input on the server.

 

This type of data validation means using PHP to verify that good values have been sent to the script. Using server-side validation has pretty much the exact opposite pros and cons of client-side development: it is more secure, works seamlessly with all browsers, and allows to use session variables, but it does so at the cost of slightly higher server load and slower feedback for users.

 

OnBeforeUpdateRecord

OnBeforeInsertRecord



Prev Return to chapter overview Next