PHP Login Registration bootstrap form implementation function

Source: Internet
Author: User
Tags free cdn
Login and registration are the most common modules we have in web development, and we are often in touch with each other in our daily lives. The following through this article to share the PHP implementation of login Registration bootstrap form function, need to refer to the friend

Objective

The previous few briefly introduced the front-end and PHP some of the knowledge points, the front-end form submission is a very important module, in this article I will introduce some knowledge about the form, if the previous content you do not have a good grasp and do not have a lot of practice, I think you'd better write down the label.

Project Introduction

Login and registration are the most common modules we have in web development, and we are often in touch with each other in our daily lives. The user fills in the content through the front-end form page, submits the post to the backstage, and then after the PHP code processes the submission, continues the operation for the login or registration logic.

Sign in and register a plot

Bootstrap front end frame [http://v3.bootcss.com/]

Bootstrap is the most popular HTML, CSS, and JS framework for developing responsive layouts, mobile device-first WEB projects.

Bootstrap how to use it? We can download its source code locally, or you can use the free CDN accelerator provided by BOOTCDN.

First we build the basic skeleton of the page


Then we click Start to find the following content

Copy the red circle CSS file to our page


Bootstrap gave a number of cases, one of which has a login page case http://v3.bootcss.com/examples/signin/

Let's imitate this page.

This inside <style></style> is wrapped in CSS, if there are doubts about the place can be a Baidu look, you can not write CSS, and then a little bit of CSS code to see the effect. Let's analyze the forms in HTML.

The form label ==> is used to wrap the contents of the form and is the starting label for the form.

The properties of the form tag action==>action= "xxx" is filled with the file address of the PHP code that handles the form, and the form sends the data to that address when the Submit button is clicked.

Form Label Properties method==> This is a bit difficult to understand, you remember to submit the form when the post is completed, method= "POST", if you are interested in Baidu to check.

input Tags ==> careful friends can see that input is a single existing,<input> tag that specifies the input fields in which the user can enter data. The <input> element is used in the <form> element to declare an input control that allows the user to enter data.

Input fields can be changed in several ways, depending on the type attribute. The common type attribute is Text,email,password,checkbox,radio,button,submit,hidden, etc., and you can try to change the type to see the effect.

The Input tag attribute name==> This name value is critical, and our background PHP code is able to distinguish each value from which input box is judged by name= "XX".

input properties of the tag required==> if the user doesn't write anything, do we allow them to submit the form? Obviously not, so we need to let users fill in the content and then submit, required meaning is necessary, if you do not fill in the content click Submit, the form will not be submitted.

summary

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.