<!doctype html public "-//W3C//DTD HTML 4.0 //EN">
<html>
<head>
<title>What should I do ?</title>
</head>
<body>
<h1> Was soll ich bloß tun....</h1>
Diese frage hat sich jeder schon oft gestellt und hier die ultimative Lösung:
Lasst den PC nur machen der weiß immer was richtig ist ;)
Die perfekte Lösung für unentschlossene !!!
[b]2 Möglichkeiten eingeben und der PC sagt euch was Ihr tun sollt :D :[/b]
<form action="/zufall.php" method="POST">
Möglichkeit1: <input type="text" name="val1" size="80">
Möglichkeit2: <input type="text" name="val2" size="80">
<input type="hidden" name="go" value="go">
<input type="submit" value="DIE LÖSUNG">
</form>
<hr>[b]Zweimal dieselbe Frage, du Depp ;)!!![/b]</body>
</html>
----------
<?php
$moeglichkeiten = array($_POST['val1'], $_POST['val2']);
$rand = rand(0, 1);
$ergebnis = $moeglichkeiten[$rand];
echo 'RICHTIG: [b]'.$moeglichkeit.'[/b]
';
echo '[b]([i]FALSCH:[/i] ';
if($ergebnis == 0)
{
echo $moeglichkeiten[1];
}
else if($ergebnis == 1)
{
echo $moeglichkeiten[0];
}
echo ')[/b]';
?>