<?php$sanity=$_POST['Sanity'];
if(!$_POST) {
echo "<form method=\"post\" action=\"".$_SERVER["PHP_SELF"]."\">".
"Are you sane? <input type=\"radio\" name=\"Sanity\" value=\"Yes\">Yes".
"<input type=\"radio\" name=\"Sanity\" value=\"No\">No"."\n".
"<input type=\"submit\" name=\"submit\" value=\"How are you?\">".
"</form>";} else {
if ($sanity!="No") {
echo "Glad you're having a good day".
"<img src=\"http://www.shawnallison.com/layoutimages/magbigrin.gif\">";} else {
echo "<img src=\"http://www.shawnallison.com/layoutimages/magbanghead.gif\">".
"The Calgon sounds nice, doesn't it?";
}}
?>
Posted by Shawn at June 13, 2007 5:47 PM in Geek.

