age/index.php

<?php include '../config.php'; date_default_timezone_set('Europe/Oslo') ?>
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8" />
	<title>Age Calculator</title>

	<?php include DOCROOT.'header.php' ?>
	<script src="script.js"></script>
	<style type="text/css">
		input
		{
			display: inline-block;
			margin-right: 1.5em;
		}
		textarea
		{
			width: 100%;
		}
		pre
		{
			border-top:1px solid #ccc;
			padding-top: 5px;
			width: 100%;
			overflow: auto;
		}
	</style>

</head>
<body>
	<h1>Age calculator</h1>

	<form action="age.php" method="post" id="form">
		<p>
			<label>Date of birth: <input name="birth" type="date" value="1985-01-01" required autofocus></label>
			<label>Now: <input name="now" type="date" value="<?php echo date('Y-m-d') ?>" required></label>
		</p>
		<p><input type="submit" value="What do we think?" /></p>
	</form>

	<output id="output"></output>

	<?php $article = 1397; include DOCROOT.'footer.php'; ?>
</body>
</html>