猿问

如何将 HTML 表单的大量表值 POST 到 PHP 数组?

我有一个mastertbl时间表网络应用程序的表单表,其中每一行代表员工完成的唯一条目,每行都有选项 3 单选按钮(仅对管理员可见),管理员在阅读员工完成的条目时选择单选按钮,然后提交完整的表格(让我的表格有 140 个条目)。


下面是admindashboardentry.php表格的行和标题(包含表单标签)功能的内容如下:


//Webpage Table Heading

                        function displayTableHeading(){


                            echo "

                            <form action='selected.php' method='post'>

                                <table border='1' cellpadding='10' cellspacing='0'>

                                    <tr>


                                        <th colspan='13'><button type='submit' class='btn btn-primary'  style='border-radius: 8px;'><i class='fas fa-edit' style='margin-right:10px;'></i>Update</button>

                                    </tr>

                                    <tr>

                                        <th>EmpID - Name</th>

                                        <th>Date</th>

                                        <th>Start Time</th>

                                        <th>End Time</th>

                                        <th>Hrs</th>

                                        <th>Project Code</th>

                                        <th>Task Performed</th>

                                        <th>Modified Date</th>

                                        <th>Invoice Num</th>

                                        <th colspan=3>Status</th>


                                    </tr>";


                            /*echo "

                                <tr>

                                    <th colspan=13><input type='submit'/></th>

                                </tr>";*/

                        }

但问题是selected.php我的表只有 100 行,而我的表有 140 个条目。我可以对表的 name 属性进行任何更改(实际上是在制作 php 数组)?还是name属性的大小有限制?



一只斗牛犬
浏览 244回答 1
1回答

Smart猫小萌

因为我托管在免费托管服务提供商处,所以我无法访问 php.ini 但我可以使用我的.htaccess文件更新它的值。这可以通过更新您的.htacess文件来解决,在我的情况下,我将其更新如下php_value upload_max_filesize 5Mphp_value post_max_size 5Mphp_value memory_limit 128Mphp_value max_input_vars 5M最后一行解决了我的问题。谢谢 SO
随时随地看视频慕课网APP
我要回答