我有一个这样的形式:链接不保存
<form id="candida-form" action="index.php?gender=<? echo $sex; ?>?step=<? echo $step; ?>" method="get">
<? if ($step == -1): ?>
<div style="padding-left: 95px;padding-top: 40px;">
<div class="radio-option"><input type="radio" id="male" name="form_sex" value="0" checked /> <label for="male" style="cursor:pointer;"><img src="images/icon_man.png" /> Male</label></div>
<div class="radio-option"><input type="radio" id="female" name="form_sex" value="1" /> <label for="female" style="cursor:pointer;"><img src="images/icon_woman.png" /> Female</label></div>
<div class="radio-option" style="padding-top:9px;"><input type="radio" id="child" name="form_sex" value="2" /> <label for="child" style="cursor:pointer;"><img src="images/icon_child.png" /> Child</label></div></div>
<div class="clear"></div>
<div class="submit-wrapper"><input type="submit" id="nextstep" value="Next Step" /></div>
<? elseif ($step == 0): ?>
<div class="form-inner">
<? if ($sex == 0): ?>
<h2>MALE</h2>
<div class="yesno">
<div class="section-description">
<p>text</p>
</div>
<? elseif ($sex == 1): ?>
<h2>FEMALE</h2>
<div class="yesno">
<div class="section-description">
<p>text</p>
</div>
<? else: ?>
<h2>CHILDREN</h2>
<div class="yesno">
<div class="section-description">
<p>text</p>
</div>
<? endif; ?>
和变量是那些:
$step = intval($_POST[ 'form_post' ]); // Gather completed step
$sex = intval($_POST[ 'form_sex' ]); // Gather gender
的想法是,当我点击该输入为“下一步”,在浏览器的URL被改变喜欢:http://xyz.com/survey/index.php?gender=0?step=1
,但如果我想提出确切的链接http://xyz.com/survey/index.php?gender=0?step=1
在一个新的浏览器,所以我可以去步骤1在男性性别的,它不会,它会去索引no的步骤,请解决任何问题?你能帮助任何想法吗?
通过'http://xyz.com/survey/index.php性别= 0&步= 1' – Peon 2012-08-07 12:03:38
表单使用 '得到' 这样$ _POST ['form_sex']从来没有设置,使用$ _GET ['form_sex'] PS $步骤仍然不是$ step + 1的下一页 – Waygood 2012-08-07 12:06:42
@Waygood最后更新是'