Php表单Post用于500多个Post参数

Php表单Post用于500多个Post参数,php,http-post,Php,Http Post,我试着发布一个包含500多个数据字段的php表单。我尝试通过jquery序列化表单数据,然后提交表单。我也得到了同样的结果。任何人都可以帮我解决这个问题。您可以使用发布一个和一个值,然后将值保存在会话数组中 在头版中,您可以这样做: <script src="https://code.jquery.com/jquery-3.1.1.min.js"></script> <script> function update_post(){ $(

我试着发布一个包含500多个数据字段的php表单。我尝试通过jquery序列化表单数据,然后提交表单。我也得到了同样的结果。任何人都可以帮我解决这个问题。

您可以使用发布一个和一个值,然后将值保存在会话数组中

在头版中,您可以这样做:

<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
<script>
    function update_post(){
        $("#/*Text Input ID Name*/").load("update_post_session.php?name=(session_array_name)&group=(session_name)&value="+ document.getElementById('Text Input ID').value.split(" ").join("_")); // .split(" ").join("_") does replace ALL spaces with underscores, this line can be used more times with different ID and value and name etc
    }
    // To update the session automaticly
        setInterval(update_post, 10000); // This will update the form each 10 seconds, if you have over 500 inputs I would recommend minimum 5 seconds so it will not cause the client to experience any downtime to form
</script>

函数更新_post(){
$(“#/*文本输入ID名称*/”).load(“update_post_session.php?Name=(session_array_Name)&group=(session_Name)&value=“+document.getElementById('Text Input ID')。value.split(“”)。join(“#”)/。split(“”)。join(“#”)会用下划线替换所有空格,这一行可以用不同的ID、值和名称等多次使用
}
//自动更新会话的步骤
设置间隔(更新后,10000);//这将每10秒更新一次表单,如果您有超过500个输入,我建议至少5秒,这样就不会导致客户端遇到任何表单停机
在update_post_session.php中,您将看到以下内容:

<?php
    session_start();
    $session_group = $_GET['session_name'];
    $session_name  = $_GET['name'];
    $value = $_GET['value'];
    /*Replacing "_" with " "*/ $value = str_replace("_", " ", $value);
    $_SESSION[$session_group][$session_name] = $value;
?>

编辑

<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
<script>
    function update_post(stop){var id = 0;
        var whileinter = setInterval(function(){
            if(id>stop){clearInterval(whileinter);}
            $("#"+id).load("update_post_session.php?name=(session_array_name)&group=(session_name)&value="+ document.getElementById('Text Input ID').value.split(" ").join("_")); // .split(" ").join("_") does replace ALL spaces with underscores, this line can be used more times with different ID and value and name etc
            id++;
        }, 1);
    }
    // To update the session automaticly
         var inter = setInterval(update_post(500 /* the amount of input boxes you have */), 10000); // This will update the form each 10 seconds, if you have over 500 inputs I would recommend minimum 5 seconds so it will not cause the client to experience any downtime to form
</script>

函数更新后(停止){var id=0;
var whileinter=setInterval(函数(){
如果(id>stop){clearInterval(whileInterer);}
$(“#“+id”).load(“update_post_session.php?name=(session_array_name)&group=(session_name)&value=“+document.getElementById('Text Input id')).value.split(“”)。join(“#”)/.split(“”)。join(“#”)会用下划线替换所有空格,这一行可以用不同的id、值和名称等多次使用
id++;
}, 1);
}
//自动更新会话的步骤
var inter=setInterval(更新_post(500/*您拥有的输入框数量*/),10000);//这将每10秒更新一次表单,如果您有超过500个输入,我建议至少5秒,这样就不会导致客户端遇到任何表单停机

在你的html中,输入你想要的表单,从0到按顺序发布的表单数量(01 2 3 4 5 6 7 8 9 10…20…50…200…500你在使用
GET
方法还是
POST
?在发送500请求之前检查一些POST?POST方法我在使用AlokRichard,然后我必须多次调用该函数来发布我的表单。或者我什么时候可以调用update_POST函数?可以吗explain@RajeshBaskaran你现在可以查看编辑