In this solution to the challenge assignment, Kevin demonstrates how to build a PHP form which will submit to itself, detect when it has been submitted, and read the form parameters.
(light music)…- [Instructor] I hope that you were successful…with your challenge assignment.…In this movie, I'm going to show you the solution…that I came up with.…First, let's look in a browser…and then we'll take a look at the code.…You can see, in the browser, I can click on Pages…and I come up with my Pages area…and I have a new link here now for Create New Page.…And when I click on it, takes me to new.php…and I get back a form to allow me to create a new page.…So, I can add the Menu Name, I can type Position,…and I can type Visible.…So let's try just write Testing…and I'll put in Visible true, and I'll click Create Page.…
Now this submits to the same page, new.php,…that's different than what we did throughout the rest…of this chapter where we used create.php.…We're using single-page submission here.…Single-page form processing.…So it's going to submit to itself, new.php and you can see…that it lists the form parameters that came in.…It says it received Testing, Position: 1, Visible: 1.…And then it redisplays the page…
- Organizing project files
- Including and requiring files
- Working with URL parameters
- Encoding dynamic content
- Modifying headers and page redirection
- Creating forms and processing form data
- MySQL basics
- Using PHP to access database tables
- Creating, reading, updating, and deleting database records with PHP
- Validating data
- Preventing SQL injection
Skill Level Beginner
1. Start a Database-Driven Project
2. Build Web Pages with PHP
3. Headers and Redirects
4. Build Forms with PHP
5. MySQL Basics
6. Use PHP to Access MySQL
7. CRUD with PHP
8. Validate Data with PHP
9. Prevent SQL Injection
Next steps1m 8s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.