PHP Script that will use the HTML Form
This is the PHP Script that will use the data entered on the html form and create a story out of them.
php opening tag
print "One day, while I was $_POST[text1] in the $_POST[text2], a $_POST[text3] $_POST[text4] fell through the roof. It immediately jumped on the $_POST[text5] and knocked over the $_POST[text6]. Then it ran out the door into the $_POST[text7] and $_POST[text8] a $_POST[text9] off the $_POST[text10]. It then knocked a glass of $_POST[text11] off the coffee table. After $_POST[text12] minutes of chasing the $_POST[text4] through the house, I finally caught it and put it outside. It quickly climbed the nearest $_POST[text13].";
php closing tag
Here is the sample output story:
One day while I was reading in the balcony a tiny mouse fell through the roof. It immediately jumped on the cabinet and knocked over the photo frame. Then it ran out the door into the living room and tackled a Figurine display off the TV. It then knocked a glass of Gatorade off the coffee table. After 15 minutes of chasing the mouse through the house, I finally caught it and put it outside. It quickly climbed the nearest tree.
The words in bold are the words entered into the form.

0 comments:
Post a Comment