From the course: PHP for Web Designers
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Challenge: Plan the order form - PHP Tutorial
From the course: PHP for Web Designers
Challenge: Plan the order form
The build of a page in the Hansel and Petal website contains a complex online form that invites customers to select flowers to create a custom bouquet. Some flowers like color lilies have a select drop down menu with a choice of colors and when you change the color, the image changes and you can update the quantity. Let's have three color lilies and let's say three sunflowers. And at the bottom of the page, the amount has been updated. All of this is controlled by JavaScript. And when the customer has finished selecting flowers, clicking the Add to Basket button loads order.php. Where the details of the order need to be displayed. At the moment, the page consists of hard coded html. So, let's see what the challenge is. Let's take a sneak peek at the final version of the site. So here we are in the Build a Bouquet page, I'm going to select some yellow color lillies, let's say have three of those. And we'll have four sunflowers maybe and a few irises. And it tells me at the bottom of…
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
-
-
-
-
-
-
-
(Locked)
Getting form input sent by the POST method4m 48s
-
Retrieving values from a URL's query string4m 8s
-
(Locked)
Challenge: Plan the order form2m 28s
-
(Locked)
Solution: Plan the order form4m 42s
-
(Locked)
Finding and extracting a substring7m 38s
-
(Locked)
Organizing the form data into arrays7m 15s
-
(Locked)
Using a loop to build a table for the data4m 42s
-
(Locked)
Controlling which rows are displayed7m 45s
-
(Locked)
Creating a custom function to extract part of a file name7m 43s
-
(Locked)
Calculating the order total6m 34s
-
(Locked)
Using PHP sessions to preserve data3m 14s
-
(Locked)
Storing data in session variables7m 33s
-
(Locked)
Ending the PHP session and deleting the data5m 37s
-
(Locked)
-
-
-