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: Displaying a seasonal feature

Challenge: Displaying a seasonal feature - PHP Tutorial

From the course: PHP for Web Designers

Start my 1-month free trial

Challenge: Displaying a seasonal feature

It's time for another challenge. I'd like you to use the techniques we've explored in this chapter to change the main feature image, and its tagline, at the top of the Hansel and Petal homepage according to the season. It's this image here, of white roses, and the tagline is: beautiful arrangements for any occasion. To see what's involved, let's take a look at the code in index.php. The tagline is on line 41, beautiful arrangements for any occasion, and the image is on line 43, its filename begins with 980_white_rose. Now, if you look in the Images folder, you'll see there are three images, all named feature_, followed by the name of a season. So, we've got feature_autumn, feature_spring, and feature_summer. So, the one that's missing is feature_winter, and so you need to find 980_white_rose. It's actually just up here on my screen. And rename that to feature_winter.jpg. All the images are the same size, so you don't need to worry about that. And if we go back to the code we'll see…

Contents