From the course: Learning PHP
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Handing multiple-choice elements - PHP Tutorial
From the course: Learning PHP
Handing multiple-choice elements
- Each of the elements and most of the elements that you've seen on the forums so far have only had one value associated with them. So, the input was pretty easy to grab, but what about elements that allow multiple values like checkbox and selects? Let's take a look at how they work. First of all, you could see here that we've added the checkboxes for what topics are you interested in? We've named them topics, and we have a multi-select box for movies. What's your favorite movie or movies? And it's all of the 'Star Wars' movies. And we've named that movie. So, let's see what happens if we just throw this form through the processor we previously used, which was for a reminder, for each loop that assigns each key value pair as name and value. So we'll go ahead and fill this out. I'll select PHP and WordPress, and then I'll select Star Wars IV and V, and I liked VII. And then I'll add the message, "Hello There!"…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
-
-
-
GET vs. POST3m 29s
-
(Locked)
Handling basic form elements3m 37s
-
(Locked)
Handing multiple-choice elements4m 44s
-
(Locked)
Form validation: Making sure required fields are filled in7m 8s
-
(Locked)
Form validation: Appropriate input4m 14s
-
(Locked)
Form validation: Sanitizing input9m 5s
-
(Locked)
Sending the form data in an email7m 9s
-
(Locked)
Challenge: Process a simple form and send the email42s
-
(Locked)
Solution: Process a simple form and send the email4m 24s
-
-
-