// Trick for integer / numeric parameters
$oldguess = $_POST['guess'] + 0;
if ( $oldguess == 42 ) {
$message = "Great job!";
} else if ( $oldguess < 42 ) {
$message = "Too low";
} else {
$message = "Too high...";
}
}
?>
A Guessing gameGuessing game...
if ( $message !== false ) {
echo("
$message
\n");
}
?>
Model
View
Controller
Context