Source File: test.php View source
<?php
$act = isset($_GET["act"])? $_GET["act"] : "";
if ($act!=""){
	echo $act.">BR>";
	echo "<a href='test.php'>go back</a>";
	die();
}

if (isset($_POST["check"])){
	$a = $_POST["a"];
	$b = $_POST["b"];

	if (check($a, $b)==1){
		header("Location: test.php?act=Equal ");
	}
	header("location: test.php?act=Not_Equal");

}
function check($a, $b){
	return ($a==$b);
}
?>
<form action="?" method="post">
a=<input type="text" name="a" value="" /><br />
b=<input type="text" name="b" value="" /><br />
<input type="submit" name="check" value=" Check " />
</form>
Output:
a=
b=