我有这样的表格:
<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 步,它不会,它会进入第 1 步的索引,请问有什么解决方案吗?你能帮忙吗?