MAD LIBS PHP style
1. Pick a fairy tale or nursery rhyme or write a story on your own. Here is
a list
of simple Grim's fairy tales ;
MORE fariy tales ;
More fairy Tales ; and fables
;
a list of nursery rhymes ;
Historic Love Letters
; Passionup Love
letters to help you with complete text to choose from.
2. Select out between 10 and 30 words you would like replaced. They can
be a name, place, action, temperature, etc. Number the words you want
replaced and categorize them as to type of word you want to replace the
existing word. Name each of these a variable name based on the number.
| Dear _____no1______ You're _____no2______ to
me--there's no one quite like you. You're the one I ___no3__, the one
I want to ___no4_____. I give you my ___no5____, and I ____no6____ you
so much. Give me your sweet ____no7_____; fill me with your wonderful
___no8____; soothe my aching ____no9___; and ___no10____ me through
the night. The mere sound of your voice summons deep ___no11_____
within Like an old familiar ____no12____ like the comfort of a
____no13___. When you're near, I'm lost to thoughts of ___no14___ as
you touch me with a ___no15____ that's as grand as stars above. I want
to hold your ___no16__. I hunger for your ___no17___. Offer me sweet
tidings of true love's tender bliss. I promise our ___no17____ shall
__no18___, carried on the wings of a ___no19___. So give me your
___no5____, and bless me with your __no6___.
With all my _____no20_____,
_____no21_______ |
3. Set up an HTML form that asks for a part of speech that would fit in each
bank. Each blank will be set as the variable name you determined for each
blank.
4. Now you need to create the php script page that will
construct your love letter. You will echo the entire
paragraph in your php, using the period to connect the known values and the
variables. Known values will be in quotes as strings, and the variables will
not be. Remember to mark your variables with a $ infront. End each line with
a semicolon.
|
(open script)
echo "Dear ".$no1."
";
echo "You're ".$no2." to me--there's no one quite like
you. You're the one I ".$no3.", the one I want to ".$no4.". I give you
my ".$no5.", and I ".$no6." you so much. Give me your sweet ".$no7.";
fill me with your wonderful ".$no8."; soothe my aching ".$no9."; and
".$no10." me through the night. The mere sound of your voice summons
deep ".$no11." within Like an old familiar ".$no12." like the comfort
of a ".$no13.". When you're near, I'm lost to thoughts of ".$no14." as
you touch me with a ".$no15." that's as grand as stars above. I want
to hold your ".$no16.". I hunger for your ".$no17.". Offer me sweet
tidings of true love's tender bliss. I promise our ".$no17." shall
".$no18.", carried on the wings of a ".$no19.". So give me your
".$no5.", and bless me with your ".$no6.".
";
echo "With all my ".$no20.", ";
echo $no21;
;(close Script) |
5. Now put it all together with graphics and such and you
have a love letter to remember!
Write a love Letter here! |