"How many times have you gotten stitches?",
"a" => "None",
"b" => "Once",
"c" => "A few times",
"d" => "I’m pretty much a modern day Frankenstein",
);
$answers[1] = array(
'a' => 0,
'b' => 2,
'c' => 3,
'd' => 4,
);
$questions[2] = array(
"Q" => "You describe your experience on bikes, rollerblades and scooters as:",
"a" => "A bit shaky, but I try to be cautious",
"b" => "Very skilled-I’m a natural",
"c" => "Terrifying, even when I’m covered in padding and bubble wrap",
"d" => "Pretty comfortable ",
);
$answers[2] = array(
'a' => 2,
'b' => 0,
'c' => 4,
'd' => 1,
);
$questions[3] = array(
"Q" => "How would you best describe your car? ",
"a" => "It’s in pristine condition and looks brand new",
"b" => "It’s got a couple of nicks, but nothing too noticeable",
"c" => "Scratched up and sporting some dents and cracks",
"d" => "Well, I totaled the last one so...",
);
$answers[3] = array(
'a' => 0,
'b' => 2,
'c' => 3,
'd' => 4,
);
$questions[4] = array(
"Q" => "You compare your walking gait to that of: ",
"a" => "Pepe LePew",
"b" => "The T-1000",
"c" => "A shuffling zombie",
"d" => "A toddler taking his first steps",
);
$answers[4] = array(
'a' => 1,
'b' => 2,
'c' => 3,
'd' => 4,
);
$questions[5] = array(
"Q" => "When an object is out of reach, what do you do?",
"a" => "I grab a stepladder and steadily retrieve it",
"b" => "I climb up the shelf or stand on whatever’s nearby",
"c" => "I stand on my tiptoes and bat at it with my fingertips until I knock it down",
"d" => "I make someone taller help me",
);
$answers[5] = array(
'a' => 2,
'b' => 4,
'c' => 3,
'd' => 0,
);
$questions[6] = array(
"Q" => "Have you ever broken a bone or gotten a sprain?",
"a" => "Nope, never",
"b" => "Eh, once or twice",
"c" => "Yeah, a few times, actually",
"d" => "I’m basically a walking mummy ",
);
$answers[6] = array(
'a' => 0,
'b' => 2,
'c' => 3,
'd' => 4,
);
$questions[7] = array(
"Q" => "Your knife skills in the kitchen can be best described as:",
"a" => "Not great - I can barely chop lettuce without having issues",
"b" => "Flawless. I deserve my own cooking show!",
"c" => "Horrifying, but at least I was able to get those fingers reattached!",
"d" => "So-so - I’ve nicked a finger every now and then",
);
$answers[7] = array(
'a' => 3,
'b' => 0,
'c' => 4,
'd' => 2,
);
$questions[8] = array(
"Q" => "A day at the ski slopes typically ends with:",
"a" => "A stretcher and a trip to the hospital",
"b" => "A clunk to the head and a few stars",
"c" => "A couple of bruises and bumps",
"d" => "Nary a scratch",
);
$answers[8] = array(
'a' => 4,
'b' => 3,
'c' => 2,
'd' => 0,
);
$questions[9] = array(
"Q" => "What’s the most likely thing to trip you up?",
"a" => "An untied shoelace",
"b" => "A set of stairs",
"c" => "A groove in the sidewalk",
"d" => "All of the above (and more)",
);
$answers[9] = array(
'a' => 1,
'b' => 2,
'c' => 3,
'd' => 6,
);
$questions[10] = array(
"Q" => "The last time you’ve gotten a scab was:",
"a" => "Years ago",
"b" => "When I was a little kid",
"c" => "Within the past year",
"d" => "I’ve got a fresh one now!",
);
$answers[10] = array(
'a' => 1,
'b' => 0,
'c' => 3,
'd' => 5,
);
$questions[11] = array(
"Q" => "When you have to cross the street, you: ",
"a" => "Pay more attention to your phone than the cars around you",
"b" => "Always look both ways and go when it’s clear",
"c" => "Take a quick glance and start jogging across",
"d" => "Just take off because pedestrians should always have the right of way",
);
$answers[11] = array(
'a' => 3,
'b' => 0,
'c' => 2,
'd' => 4,
);
$questions[12] = array(
"Q" => "How sure footed are you?",
"a" => "I’m as stable as a mountain goat",
"b" => "I’ve slipped every now and then",
"c" => "It kind of depends on what shoes I’m wearing...",
"d" => "I’m like Bambi trying to walk on ice",
);
$answers[12] = array(
'a' => 0,
'b' => 2,
'c' => 3,
'd' => 4,
);
function proneness ($score)
{
if ($score > 30)
{
return "You're an Accident Waiting to Happen!
Bust out the bubble wrap because you are a walking klutz. We're surprised
your local hospital hasn't named a wing after you.";
}
elseif ($score > 20)
{
return "You're Somewhat Accident Prone
You've experienced your fair share of bumps, bruises and cuts, but it's not so bad that you have to live in a human-sized hamster ball. Just be careful and look out for that next step...";
}
elseif ($score > 20)
{
return "You're a Little Klutzy
For the most part you're able to pull it together, but every so often you get in a little mishap. Don't worry, variety is the spice of life, and it wouldn't be much of one without a scrape or two.";
}
else
{
return "You're Virtually Indestructible!
Either you're invulnerable or you just never get injured. We're betting it's the latter, but you might want to invest in a utility belt and cape just in case...";
}
}
function proneness_short ($score)
{
// Obviously remove this when you do add the url...
die("You need to add a URL to the proneness function in " . __FILE__ . " on line " . (__LINE__ + 2) . "");
return "I just scored $score on the Accident Prone Quiz";
}
function getVal($varName, $default = '')
{
if (isset($_GET[$var_name]))
{
return $_GET[$var_name];
}
else
{
if (isset($_POST[$var_name]))
{
return $_POST[$var_name];
}
else
{
return $default;
}
}
}
$q_count = count($questions);
?>