From the course: PHP: Object-Oriented Programming with Databases

Unlock this course with a free trial

Join today to access over 25,500 courses taught by industry experts.

HTML forms for OOP

HTML forms for OOP

[Instructor] In this movie, I want to show you a technique for working with form data that's very useful when we're working with object-oriented programming. This technique does not use php at all. It really just uses plain HTML, but I think that it's helpful enough that we should cover it here. So far, when we've been creating our form data, we've been creating our form tags, such as input. We have typed text, and then we've been giving it a name, and the name is just the property that we want to be associated with. We have brand, model, year, et cetera. Altogether our code, we have 10 different form elements and they're and not all input tags, but you get the idea. When we submit our form, it's going to submit values for each one of those properties, and then when we go to process the form values, we're going to take each one of those values that's been submitted in the post data and we're going to create an associative…

Contents