【发布时间】:2010-03-08 03:10:21
【问题描述】:
我正在尝试使用 php 和 jquery 构建一个表单,但是对于如何处理其中的 jquery 部分我有点困惑......
基本上,当用户提交第一个表单时,我想将他们引导到“下一步”表单,但我想将第一个表单提交的值保留在隐藏的输入字段中......
如果有人能告诉我如何或给我一个好的教程,我将不胜感激......
我还没有任何 php 或 jquery,这只是 html 标记的简化版本...
//first.php
<form name="form1" method="post" action="second.php">
<input type="text" name="name" value="" />Name
<input type="submit" name="step1" value="Next" />
</form>
//second.php
<form name="form2" method="post" action="process.php">
<input type="hidden" name="name" value="{$_POST['name']}" />
<input type="text" name="message" value="" />message
<input type="submit" name="step2" value="Finish" />
</form>
【问题讨论】: