I’m fairly new to PHP so please don’t be too mean lol. I’m getting some errors and I’m not sure what I’m doing wrong. Please just point me in a direction!
I need to create a MadLibs with textbox, checkbox, and dropdown. When submitted, it should tell the story with the words from the form in a different color.
Thank you!
HTML
Crazy Mad Lib body { background: #dad1ff; text-align: center; } h2 { color: #68197f; }Create your crazy story here by filling in the blanks!
Please fill out the form below on your favorite vacation get away!
A males name
A breed of dog
Please pick a verb:
Skipping
Running
Roller blading
Name an animal
Please pick a color
Blue
Purple
Red
Please provide a verb
Please pick an object:
Rock
Bridge
Please pick an emotion:
Happy
Sad
Mad
Relieved
PHP
Crazy Mad Lib body { background: #dad1ff; text-align: center; }h2 {
color: #68197f;
}
#randomwords {
color: #7001ff;
}
Heres the crazy story that you created!
echo 'Once upon a time, there was a young man named ’ . $males_name . ’ This man and his ’ . $breed . ’ named Pudge decided to go out for the day.
’ . $males_name . ’ and Pudge were ’ . $male_verb . ’ when all of a sudden something came out from behind a tree! It was a ’ . $animal . '. When Pudge started
barking at it, the ’ . $animal . ’ turned from yellow to ’ . $color . ’ because it was angry! It started to ’ . $animal_verb . ’ after the two friends!
After ten minutes of dodging the animals claws, the two friends were finally able to hide under a ’ . $hiding . '! Pudge and ’ . $males_name . ’ were feeling
’ . $emotion . ’ because of the attack. After collecting themselves, the two friends decided it was best to continue on with their day!
?>
Again…I’m sorry if I’m bad at this!!