Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/259.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/84.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 引导多阶段表单-使用JQuery收集用户输入_Php_Jquery_Forms - Fatal编程技术网

Php 引导多阶段表单-使用JQuery收集用户输入

Php 引导多阶段表单-使用JQuery收集用户输入,php,jquery,forms,Php,Jquery,Forms,我正在处理一个多阶段表单,我想收集用户输入的数据,以便在最后创建一个摘要页面 当用户点击此表单上的“下一步”按钮时,我希望获取他们输入的任何数据,并将其显示在表单的下一阶段使用jQuery。我还需要存储这些值,以便在用户在汇总后提交表单时发送到DB 以下是我正在处理的表单示例: <fieldset> <div class="form-top"> <div class="form-top-left"> <h2

我正在处理一个多阶段表单,我想收集用户输入的数据,以便在最后创建一个摘要页面

当用户点击此表单上的“下一步”按钮时,我希望获取他们输入的任何数据,并将其显示在表单的下一阶段使用jQuery。我还需要存储这些值,以便在用户在汇总后提交表单时发送到DB

以下是我正在处理的表单示例:

<fieldset>
    <div class="form-top">
        <div class="form-top-left">
            <h2>Servers</h2>
            <h3>Tell us about the servers you need</h3>
        </div>
        <div class="form-top-right">
            <img src="assets/images/icons/select_servers.png" class="form-icon">
        </div>
    </div>
    <div class="form-bottom">
        <div class="form-group">
            <p>Does this quote include servers?</p>
            <div class="form-check">
                <input class="form-check-input" type="radio" name="serverRadios" id="formIncludeServers" value="Yes">
                <label class="form-check-label">Yes</label>
                <div class="reveal-if-active">
                    <label for="select-servers">How many do you need?</label><br />
                    <label for="pro-server" class="form-partner-label">Pro Server</label>
                    <input type="text" name="pro-quantity" class="form-proserver-qty form-control" id="form-partner-pro" value="0">
                    <br />
                    <label for="device-9104" class="form-partner-label">Mini Server</label>
                    <input type="text" name="mini-quantity" class="form-miniserver-qty form-control" id="form-partner-mini" value="0">
                </div>
            </div>
            <div class="form-check">
                <input class="form-check-input" type="radio" name="serverRadios" id="formExcludeServers" value="No" checked="">
                <label class="form-check-label">No</label>
            </div>
        </div>
        <br />
        <button type="button" class="btn btn-previous">Previous</button>
        <button type="button" class="btn btn-next">Next</button>
    </div>
</fieldset>

服务器
告诉我们您需要的服务器
此报价是否包括服务器

对 您需要多少 专业服务器
小型服务器 不
以前的 下一个
您是否编写了存储到db中的代码?我有一个PHP脚本,在用户注册帐户时将用户信息存储到db中。但是,在这种情况下,我需要在提交表单之前收集信息,并将其显示在摘要字段集中。是否要通过ajax或表单提交?提交应通过表单。我没有在这个项目中使用ajax。你在使用引导css吗?