Created
December 18, 2013 00:40
-
-
Save AndrewKralovec/8015467 to your computer and use it in GitHub Desktop.
PHP code to help solve AXIOMATIC PROOF'S. an axiomatic system is any set of axioms from which some or all axioms can be used in conjunction to logically derive theorems.You use three proposition to construct Aristotle's basic frame of argument: 'Syllogism ' . Every Syllogism consist of three and only three terms. In my logic class, none of my fe…
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<?php | |
if (isset($_POST["a"]) && isset($_POST["b"])) { | |
$a = $_POST["a"]; | |
$b = $_POST["b"]; | |
$Fproof ; | |
if ($a[0] == "A" && $b[0] == "A") { | |
$Fproof = "A"; | |
} elseif ($a[0] == "A" && $b[0] == "E") { | |
$Fproof ="E"; | |
} elseif ($a[0] == "A" && $b[0] == "I") { | |
$Fproof ="I"; | |
} elseif ($a[0] == "A" && $b[0] == "O") { | |
$Fproof ="O"; | |
} elseif ($a[0] == "E" && $b[0] == "A") { | |
$Fproof ="E"; | |
} elseif ($a[0] == "E" && $b[0] == "E") { | |
$Fproof ="E"; | |
} elseif ($a[0] == "E" && $b[0] == "I") { | |
$Fproof ="O"; | |
} elseif ($a[0] == "E" && $b[0] == "O") { | |
$Fproof ="O"; | |
} elseif ($a[0] == "I" && $b[0] == "A") { | |
$Fproof ="I"; | |
} elseif ($a[0] == "I" && $b[0] == "E") { | |
$Fproof ="O"; | |
} elseif ($a[0] == "I" && $b[0] == "I") { | |
$Fproof ="I"; | |
} elseif ($a[0] == "I" && $b[0] == "O") { | |
$Fproof ="O"; | |
} elseif ($a[0] == "O" && $b[0] == "A") { | |
$Fproof ="O"; | |
} elseif ($a[0] == "O" && $b[0] == "E") { | |
$Fproof ="O"; | |
} elseif ($a[0] == "O" && $b[0] == "I") { | |
$Fproof ="O"; | |
} elseif ($a[0] == "O" && $b[0] == "O") { | |
$Fproof ="O"; | |
} else { | |
echo "Error : NOT vailid Input"; | |
} | |
if ($a[1] == $b[1]) { | |
echo $Fproof , $b[2] , $a[1] ; | |
} elseif ($a[1] == $b[2]) { | |
echo $Fproof , $b[1] , $a[2] ; | |
}elseif ($a[2] == $b[1]) { | |
echo $Fproof , $b[2] , $a[1] ; | |
}elseif ($a[2] == $b[2]) { | |
echo $Fproof , $b[1] , $a[1] ; | |
} else { | |
echo "Error : No middle term" ; | |
} | |
} | |
?> | |
<form action="" method="POST"> | |
Major Premise <input type= "text" name="a" /> | |
<br> | |
Minor Premise <input type= "text" name="b" /> | |
<input type ="submit" value="Submit" /> | |
</form> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment