Trap Detector Results
Addictive Traps in Descending Order of Importance
// declare variables
$pig = 0;
$perverse = 0;
$karma = 0;
$recursive = 0;
$attach = 0;
$dependency = 0;
// QUESTION 1 CODE
if (isset($_POST['q1'])) { // If Question 1 has an answer
if ($_POST['q1'] == '0') // If Question 1 answer is 0 .. do not add anything
$pig = $pig + 0;
if ($_POST['q1'] == '1')
$pig = $pig + 3;
if ($_POST['q1'] == '2')
$pig = $pig + 6;
} else {
echo '
ERROR: You must select an answer for question 1 . Please click the back button in your browser and answer the question in reference. Or to start the test over…Please click HERE .
‘;
}
// QUESTION 2 CODE
if (isset($_POST['q2'])) {
if ($_POST['q2'] == ’0′) {
$perverse += 0 ;
$attach += 0 ;
}
elseif ($_POST['q2'] == ’1′) {
$perverse += 3;
$attach += 1;
} elseif ($_POST['q2'] == ’2′){
$perverse = $perverse += 6 ;
$attach = $attach += 2;
}
} else {
echo ‘
ERROR: You must select an answer for question 2 . Please click the back button in your browser and answer the question in reference. Or to start the test over…Please click HERE .
‘;
}
// QUESTION 3
if (isset($_POST['q3'])) {
if ($_POST['q3'] == ’0′) {
$pig += 0 ;
$attach += 0 ;
$dependency += 0;
}
elseif ($_POST['q3'] == ’1′) {
$pig += 1 ;
$attach += 1 ;
$dependency += 1;
} elseif ($_POST['q3'] == ’2′){
$pig += 2 ;
$attach += 2;
$dependency += 2;
}
} else {
echo ‘
ERROR: You must select an answer for question 3 . Please click the back button in your browser and answer the question in reference. Or to start the test over…Please click HERE .
‘;
}
// QUESTION 4
if (isset($_POST['q4'])) {
if ($_POST['q4'] == ’0′) {
$karma += 0 ;
$dependency += 0;
}
elseif ($_POST['q4'] == ’1′) {
$karma += 2 ;
$dependency += 1;
} elseif ($_POST['q4'] == ’2′){
$karma += 4 ;
$dependency += 2;
}
} else {
echo ‘
ERROR: You must select an answer for question 4 . Please click the back button in your browser and answer the question in reference. Or to start the test over…Please click HERE .
‘;
}
// QUESTION 5
if (isset($_POST['q5'])) {
if ($_POST['q5'] == ’0′) {
$pig += 0;
$karma += 0 ;
$dependency += 0;
}
elseif ($_POST['q5'] == ’1′) {
$pig += 1;
$karma += 2 ;
$dependency += 1;
} elseif ($_POST['q5'] == ’2′){
$pig += 2;
$karma += 4 ;
$dependency += 2;
}
} else {
echo ‘
ERROR: You must select an answer for question 5 . Please click the back button in your browser and answer the question in reference. Or to start the test over…Please click HERE .
‘;
}
// QUESTION 6
if (isset($_POST['q6'])) {
if ($_POST['q6'] == ’0′) {
$recursive += 0;
$karma += 0 ;
}
elseif ($_POST['q6'] == ’1′) {
$recursive += 3;
$karma += 1 ;
} elseif ($_POST['q6'] == ’2′){
$recursive += 6;
$karma += 2 ;
}
} else {
echo ‘
ERROR: You must select an answer for question 6 . Please click the back button in your browser and answer the question in reference. Or to start the test over…Please click HERE .
‘;
}
// QUESTION 7
if (isset($_POST['q7'])) {
if ($_POST['q7'] == ’0′) {
$recursive += 0;
$attach += 0 ;
}
elseif ($_POST['q7'] == ’1′) {
$recursive += 2;
$attach += 1 ;
} elseif ($_POST['q7'] == ’2′){
$recursive += 4;
$attach += 2 ;
}
} else {
echo ‘
ERROR: You must select an answer for question 7 . Please click the back button in your browser and answer the question in reference. Or to start the test over…Please click HERE .
‘;
}
// QUESTION 8
if (isset($_POST['q8'])) {
if ($_POST['q8'] == ’0′) {
$attach += 0 ;
}
elseif ($_POST['q8'] == ’1′) {
$attach += 2 ;
} elseif ($_POST['q8'] == ’2′){
$attach += 4 ;
}
} else {
echo ‘
ERROR: You must select an answer for question 8 . Please click the back button in your browser and answer the question in reference. Or to start the test over…Please click HERE .
‘;
}
// QUESTION 9
if (isset($_POST['q9'])) {
if ($_POST['q9'] == ’0′) {
$pig += 0 ;
$perverse += 0;
$karma += 0;
$attach +=0 ;
}
elseif ($_POST['q9'] == ’1′) {
$pig += 1 ;
$perverse += 1;
$karma += 1;
$attach +=1 ;
} elseif ($_POST['q9'] == ’2′){
$pig += 2 ;
$perverse += 2;
$karma += 2;
$attach +=2 ;
}
} else {
echo ‘
ERROR: You must select an answer for question 9 . Please click the back button in your browser and answer the question in reference. Or to start the test over…Please click HERE .
‘;
}
// QUESTION 10
if (isset($_POST['q10'])) {
if ($_POST['q10'] == ’0′) {
$perverse += 0;
$karma += 0;
$recursive +=0 ;
}
elseif ($_POST['q10'] == ’1′) {
$perverse += 1;
$karma += 1;
$recursive +=1 ;
} elseif ($_POST['q10'] == ’2′){
$perverse += 2 ;
$karma += 2;
$recursive +=2 ;
}
} else {
echo ‘
ERROR: You must select an answer for question 10 . Please click the back button in your browser and answer the question in reference. Or to start the test over…Please click HERE .
‘;
}
// QQUESTION 11
if (isset($_POST['q11'])) {
if ($_POST['q11'] == ’0′) {
$pig += 0;
$dependency += 0;
}
elseif ($_POST['q11'] == ’1′) {
$pig += 1;
$dependency += 1;
} elseif ($_POST['q11'] == ’2′){
$pig += 2;
$dependency += 2 ;
}
} else {
echo ‘
ERROR: You must select an answer for question 11 . Please click the back button in your browser and answer the question in reference. Or to start the test over…Please click HERE .
‘;
}
// QQUESTION 12
if (isset($_POST['q12'])) {
if ($_POST['q12'] == ’0′) {
$perverse += 0;
$recursive += 0;
$attachment += 0;
$dependency += 0;
}
elseif ($_POST['q12'] == ’1′) {
$perverse += 2;
$recursive += 1;
$attachment += 1;
$dependency += 1;
} elseif ($_POST['q11'] == ’2′){
$perverse += 4;
$recursive += 2;
$attachment += 2;
$dependency += 2;
}
} else {
echo ‘
ERROR: You must select an answer for question 12 . Please click the back button in your browser and answer the question in reference. Or to start the test over…Please click HERE .
‘;}
// QUESTION 13
if (isset($_POST['q13'])) {
if ($_POST['q13'] == ’0′) {
$dependency += 0;
}
elseif ($_POST['q13'] == ’1′) {
$dependency += 2;
} elseif ($_POST['q13'] == ’2′){
$dependency += 4 ;
}
} else {
echo ‘
ERROR: You must select an answer for question 13 . Please click the back button in your browser and answer the question in reference. Or to start the test over…Please click HERE .
‘;
}
// THIS IS THE PRINT OUT AREA
echo ‘
echo ‘
Your Scores:
‘;
//echo ‘
//echo “PIG = $pig
“;
//echo “ATTACHMENT = $attach
“;
//echo “PERVERSE = $perverse
“;
//echo “DEPENDENCY = $dependency
“;
//echo “RECURSIVE = $recursive
“;
//echo “KARMA = $karma
“;
?>
$results = array('THE PIG' => $pig,’ATTACHMENT’ => $attach,’PERVERSE MOTIVATION’ => $perverse,’DEPENDENCE’ => $dependency,’RECURSIVE TRAPS’ => $recursive,’KARMA OF BEHAVING BADLY’ => $karma); // assign the values
arsort ($results); // sort from highest value to lowest value
foreach ($results as $name => $values) {
print “$name = ” . “$values
“;
}
//$trap = array(‘pig’ , ‘recursive’, ‘karma’ , ‘attach’ , ‘dependency ‘ , ‘perverse’);
//foreach($trap as $x) {
//arsort($trap);
//foreach ($trap as $key => $val) {
// echo “$key = $val\n”;
//echo ‘
‘;
//}
//}
?>
Using your results:
The 6 addictive traps are listed above along with how highly your scored on each one. We are interested in discovering which trap(s) has the highest score, as this is the one you should focus on first. Please click the button below for a description of and solution to the trap(s) with the highest score:
- No categories



