课程: Learning PHP
今天就学习课程吧!
今天就开通帐号,24,700 门业界名师课程任您挑!
Handling basic form elements
- [Instructor] There are all sorts of form elements you can use to capture input from users. So what exactly do we mean by basic elements here? Essentially, a basic element is any element that sends a single value for the field. In other words, most elements. We'll go through some of the most common form fields in this section but it will not cover all elements. If you're ever unsure, be sure to use var dump or print R to see what's going on. Speaking of, let's take another look at the post array from earlier. You can see that it's an associative array and the keys match the name of the form field. So if we go back to our code, you'll see that our method is post, and now we have a new action attribute here. The action attribute is the page that should process the form. And I've created a new file called process.php here to make the form processing a little clearer. In order to process the basic form elements, we can…
随堂练习,边学边练
下载课堂讲义。学练结合,紧跟进度,轻松巩固知识。
内容
-
-
-
-
-
-
-
-
-
-
GET vs. POST3 分钟 29 秒
-
(已锁定)
Handling basic form elements3 分钟 37 秒
-
(已锁定)
Handing multiple-choice elements4 分钟 44 秒
-
(已锁定)
Form validation: Making sure required fields are filled in7 分钟 8 秒
-
(已锁定)
Form validation: Appropriate input4 分钟 14 秒
-
(已锁定)
Form validation: Sanitizing input9 分钟 5 秒
-
(已锁定)
Sending the form data in an email7 分钟 9 秒
-
(已锁定)
Challenge: Process a simple form and send the email42 秒
-
(已锁定)
Solution: Process a simple form and send the email4 分钟 24 秒
-
-
-