Return to Snippet

Revision: 10746
at January 12, 2009 10:16 by 1man

Initial Code
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
<html xmlns="" lang="en">
		<title>PHP Test</title>
		<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
		Enter your age: <input name="age" size="2">
		<input type="submit" name="submit" value="Go">
			} else {
				//Grab the text we input
				$input = $_POST['age'];
				if($input < 27){
					echo "You are young";
				} elseif($input == 27){
					echo "The perfect age";
				} elseif($input > 27){
					echo "You are old!";

Initial URL

Initial Description
Simple PHP tutorial on how to use isset.

Initial Title
Use of PHP isset for a submit form

Initial Tags
form, php, html

Initial Language