Below is the source code of IQ.php <HTML> <HEAD> <TITLE>Your IQ Test Result!</TITLE> </HEAD> <BODY> <?php //Initialize variables $T1 = $_POST['T1']; $T2 = $_POST['T2']; $T3 = $_POST['T3']; $T4 = $_POST['T4']; $T5 = $_POST['T5']; $T6 = $_POST['T6']; $T7 = $_POST['T7']; $T8 = $_POST['T8']; $T9 = $_POST['T9']; $T10 = $_POST['T10']; $empty=strlen($_POST['age']); if ($empty==0) { die('You forgot to enter your age. Press back.Thanks.'); } else { $chronologicalage = $_POST['age']; } //1 if($T1 == round) { $TS1 = 3; } else { $TS1 = 0; } //2 if($T2 ==15) { $TS2 = 3; } else { $TS2 = 0; } //3 if($T3 == 15) { $TS3 = 3; } else { $TS3 = 0; } //4 if($T4 == 12) { $TS4 = 3; } else { $TS4 = 0; } //5 if($T5 == 1) { $TS5 = 3; } else { $TS5 = 0; } //6 if($T6 == 13) { $TS6 = 3; } else { $TS6 = 0; } //7 if($T7 =="cnn") { $TS7 = 4; } else { $TS7 = 0; } //8 if($T8 == 1980) { $TS8 = 4; } else { $TS8 = 0; } //9 if($T9 =="vlookup") { $TS9 = 4; } else { $TS9 = 0; } //10 if($T10 == 360000) { $TS10 = 30; } else { $TS10 = 0; } //Total mental age scores $mentalage= $TS1 + $TS2+ $TS3+ $TS4+ $TS5+ $TS6+ $TS7+ $TS8+ $TS9+ $TS10; $IQ= ($mentalage/$chronologicalage)*100; echo "<br />Hi, your IQ is:"." ".round($IQ,0); echo "<br />"; echo "<br />Thank you for taking this test!<br />" ?> </BODY> </HTML> Basically, you can vary the test questions but never the scoring. You can use this type of test online. Please note that this is not guaranteed to be accurate because it is just a 10 question test.
blog comments powered by Disqus |
|
|
|
|
|
|
|