function checkValues($step, $agree, $page); { if($step == 1 && $agree == "yes") { header('Location: ?step=$page'); } else { header('Location: ?step=$page&warn=yes'); } }
checkValues($_POST['step1'], $_POST['agree'], $_POST['page'])
<input type="hidden" name="page" value="1" />