Php validation form check field is empty method, validation Field

Source: Internet
Author: User
Tags php form

Php validation form check field is empty method, validation Field

This example describes how to check whether a field in a php form is empty. Share it with you for your reference. The details are as follows:

Php verifies the form and checks whether the field is empty. If there are unfilled fields in the form, an error message is displayed.

Php back-end code, saved as: ErrorCheck. php

The trim () function removes the trailing and trailing null characters in the string.

" " (ASCII 32 (0×20)), an ordinary space."\t" (ASCII 9 (0×09)), a tab."\n" (ASCII 10 (0x0A)), a new line (line feed)."\r" (ASCII 13 (0x0D)), a carriage return."\0″ (ASCII 0 (0×00)), the NUL-byte."\x0B" (ASCII 11 (0x0B)), a vertical tab.

I hope this article will help you with php programming.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.