<?php

if ( isset($_POST['submit']) && $_POST['submit'] == 'Submit' )
{
	header('Content-Type: text/plain; chatset=utf-8;');
	print_r($_POST);
	exit;
}

header('Content-Type: text/html; charset=utf-8;');

echo <<<FORM
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<title>Test behaviour of forms</title>
</head>
<body>
<form id="f1" action="" method="post" enctype="application/x-www-form-urlencoded">
	<fieldset>
		<legend>Fieldset 1</legend>
		<label for="f1_input1">Label 1</label>
		<input type="text" id="f1_input1" name="f1_input1" value="" maxlength="10"/>
		<label for="f1_input2">Label 2</label>
		<input type="text" id="f1_input2" name="f1_input2" value="" maxlength="10" title="test"/>
		<!-- How the hell do we validate radio buttons, checkboxes, selects, etc.? --><!-- Easily! :D (For checkboxes. >_>) -->
		<label for="f1_checkbox1">Label 3</label>
		<input type="checkbox" id="f1_checkbox1" name="f1_checkbox1" value="" checked="checked"/>
		<!-- Okay, Mr. Smartypants, how are you going to validate a RADIO BUTTON? -->
		<label for="f1_radio1">Label 4</label>
		<input type="radio" id="f1_radio1" name="f1_radio1" value=""/>
	</fieldset>
	<fieldset>
		<input type="submit" name="submit" value="Submit"/>
	</fieldset>
</form>
</body>
</html>
FORM;

?>
