Yes/No Oracle – The Fortune Teller

Please Enter Your Question Below:

  

“;

if($_POST[posted]){
srand((double)microtime() * 1000000);
$answeroutput = $_POST[question] ? $answers[rand(0, (sizeof($answers)-1))] : “I can only answer
if you ask a question!”;
}
else
$answeroutput = “”;
$formquestion = $_POST[question] ? : “Please Enter A Question Below”;

$output = str_replace(“%%Question%%”, $formquestion, $output);
$output = str_replace(“%%FORM%%”, $formoutput, $output);
$output = str_replace(“%%ANSWER%%”, $answeroutput, $output);

echo $output;

?>