PHP - Programming Language
This course covers the basics of programming in PHP. Work your way through the videos and we'll teach you everything you need to know to start your programming journey!

Building A Mad Libs Game

Lesson 12
Author : Mike Dane
Last Updated : November, 2017


Code

site.phpCopy
<form action="site.php" method="GET"> Color: <input type="text" name="color"> Plural Noun: <input type="text" name="pluralNoun"> Celebrity: <input type="text" name="celebrity"> <input type="submit"> </form> <?php $color = $_GET["color"]; $pluralNoun = $_GET["pluralNoun"]; $celebrity = $_GET["celebrity"]; echo "Roses are $color"; echo "$pluralNoun are blue"; echo "I love $celebrity"; ?>