C - Image Selector
Create an Image Selector website that allows the user to choose an image to display.
The website should:
- Allow the user to select an animal from a drop-down list
- Include options for Cat, Dog and Rabbit
- Send the selected image filename to image.php using the GET method
- Retrieve the selected image filename using $_GET
- Store the image filename in a variable
- Use the variable to display the correct heading and image
- Include a Back link to return to the image selector
<select name="image">
<option value="cat.png">Cat</option>
When using echo to output HTML, use different quotation marks inside the string to avoid conflicts.
echo "<img src=''>";
Here, double quotes surround the PHP string and single quotes are used for the HTML attribute.