Assignment 1- Mad Libs Redux

Implement Mad Libs in PHP, with a very simple interface.

Minimum Specs:

Phase 1
The first page the user will be presented with is a simple greeting and a form with the following:

Upon pressing the submit button, the user will sent to another page to be presented with her story as well as a link to the url of the text version of the story which has been saved. A link to "start-over" should also be included.

Phase 2

In addition to the above, the first page will also include an "I'm lazy" button. If "I'm lazy" is pressed instead of "submit" — the user will be presented with a generated story, wherein the parts of speech will be randomly selected from a list. The option to save should still be there.

Notes: There's stil a LOT to think about, despite these relatively simple instructions. Additional things:

FSU Courses:LIS5364:Assignment 2 - Advanced Bash:hints3

A good minimum — which would be annoying but aggressively safe is to simply reject the entire thing and force the user to start over if anything other than alphanumeric content is recieved. A function would be very good for this. In the final project from last time, you could simply assign the value "recieved" into the POST variable without error checking; what you will want to do now is only *conditionally* assign the value — one way would be to assign the true value if the input is valid, otherwise assign some sort of "ERROR" if the input is invalid. Then, on the next page, conditionally "run" the generator if the input is valid — or show the user an error and invite them to start over. You could simply make lots of pages with links for this, or you could try some cleverness using ISSET type variables with POST.

This may help (as well as any other PHP function or stack overflow help you can find) :

Offhand, these were the issues that I feel like would be the most important. Definitely feel free to barrage me with questions, and I will send announcements if I make major changes, additions here.