فرم HTML تمرین به صورت زیر است:
<!DOCTYPE HTML>
<html>
<head>
<title>Session Counter</title>
<style>
form{width:300px; border:solid 1px lightgray; padding:20px}
</style>
</head>
<body>
<form method="post">
<label></labeL>
<p>
<input type="submit" name="Increase" value="+">
<input type="submit" name="Decrease" value="-" <?php if(@$_SESSION['item']<1){echo 'disabled';}?>>
<input type="submit" name="Clear" value="Clear" <?php if(@$_SESSION['item']<1){echo 'disabled';}?>>
</p>
<div><input type="txt" name="result" value="<?php echo @$_SESSION['item'];?>"></div>
<span><?php echo @$msg;?></span>
</form>
</body>
</html>