| 
<?php
require_once 'Post.inc';
 //get instance
 $post = Post::getInstance();
 
 //get data - access $_POST array as it would be an object
 $testValue = $post->testValue;
 $step = $post->step;
 
 if ($step == null) {
 $step = 1;
 }
 
 //increment
 $testValue += $step;
 
 ?>
 <html>
 <body>
 <form method="POST">
 Value to be incremented: <input type="text" name="testValue" value="<?=$testValue?>"/>
 <br/>Step: <input type="text" name="step" value="<?=$step?>"/>
 <br/><input type="submit" value="increment"/>
 </form>
 </body>
 </html>
 |