<?php if (!$submit) //if the submit button wasn't pressed { ?> <form action="<? echo $PHP_SELF; ?>" method="POST"> Person:<input type="text" name="name"><br> Meal:<input type="text" name="meal"><br> Noun:<input type="text" name="noun1"><br> Verb:<input type="text" name="verb1"><br> Verb(Past-tense):<input type="text" name="verb2"><br> Person:<input type="text" name="name2"><br> ADJ:<input type="text" name="ADJ1"><br> ADJ:<input type="text" name="ADJ2"><br> <input type="reset" name="reset" value="Reset All"><input type="submit" name="submit" value="Put it together!"> </form> |
<?php } else //if the submit button WAS pressed { echo "$name was walking down the street when he came across a(n) $noun1 during $meal. He swung the $noun1 around and then $verb2 on it. He took it home and showed $name2. Later on, $name and $name2 cooked the $noun1 and had it for $meal. It tasted very $ADJ1 but $ADJ2 nonetheless."; } ?> |
<?php if (!$submit) //if the submit button wasn't pressed { ?> <form action="<? echo $PHP_SELF; ?>" method="POST"> Person:<input type="text" name="name"><br> Meal:<input type="text" name="meal"><br> Noun:<input type="text" name="noun1"><br> Verb:<input type="text" name="verb1"><br> Verb(Past-tense):<input type="text" name="verb2"><br> Person:<input type="text" name="name2"><br> ADJ:<input type="text" name="ADJ1"><br> ADJ:<input type="text" name="ADJ2"><br> <input type="reset" name="reset" value="Reset All"><input type="submit" name="submit" value="Put it together!"> </form> <?php } else //if the submit button WAS pressed { echo "$name was walking down the street when he came across a(n) $noun1 during $meal. He swung the $noun1 around and then $verb2 on it. He took it home and showed $name2. Later on, $name and $name2 cooked the $noun1 and had it for $meal. It tasted very $ADJ1 but $ADJ2 nonetheless."; } ?> |