Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/255.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表单数据_Php_Forms_Post - Fatal编程技术网

未传递PHP表单数据

未传递PHP表单数据,php,forms,post,Php,Forms,Post,我有一个相当基本的问题,但我就是想不起来 我有一个PHP表单,它已经运行了很长时间,突然,PHP表单值没有与post数据一起传递。为了解决问题,我开始从表格中删除一些行,直到某个点,for再次开始工作。所以我加了一行回来,它就停了?我根本无法解释这一点。我检查了post_max_size设置和它的120m,所以这不是问题。甚至提交按钮的POST值也没有被传递。print_r()不显示任何数据 我的完整表格(曾经工作过)是: 日期和时间 停泊 装载数量 拖车 重量公斤 来源 目的地 循环类型 适

我有一个相当基本的问题,但我就是想不起来

我有一个PHP表单,它已经运行了很长时间,突然,PHP表单值没有与post数据一起传递。为了解决问题,我开始从表格中删除一些行,直到某个点,for再次开始工作。所以我加了一行回来,它就停了?我根本无法解释这一点。我检查了post_max_size设置和它的120m,所以这不是问题。甚至提交按钮的POST值也没有被传递。print_r()不显示任何数据

我的完整表格(曾经工作过)是:


日期和时间
停泊
装载数量
拖车
重量公斤
来源
目的地
循环类型
适用费率
LOC状态/评论

令人沮丧的是,这个问题的答案不在于代码本身,而在于传递的表单字段的数量

我减少了while循环中mysql的行数,并重新提交了表单,表单处理成功。在
max\u input\u vars
字段中设置为1000。我认为这是问题的根源,并已与我的托管公司记录了一个电话,为我更改php.ini参数


感谢您的帮助,

您为使其正常工作而删除了哪条线路?如果你告诉我们,我会更容易,而不是我们必须从两个单独的代码片段中找出它。你检查过你是否有PHP错误吗?(启用PHP错误报告以进行调试:
error\u reporting(E\u ALL);
)您的代码编写方式非常糟糕,几乎无法长期维护。此外,如果($row['adminstatus']=“approvereject”)
您在此处分配给$row,“font”属性也不再有效
if(isset($row['approvedby'])
如果
$row['approvedby']=”,则可能也为true@Smudger我们需要查看结果HTML,即您的代码生成的内容。因此,我们可以看到阻止表单提交的错误在哪里。
<form name="form1" id="form1" action="bsassigncosts.php" method="post">
<table id="hor-minimalist-a">
    <tr>
        <th></th>
        <th>Date & Time</th>
        <th>Parked</th>
        <th><font color=red>Load Number</font></th>
        <th><font color=red>Trailer</font></th>
        <th><font color=red>Weight</font> kg's</th>
        <th><font color=red>Source</font></th>
        <th><font color=red>Destination</font></th>
        <th><font color=red>Cycle Type</font></th>
        <th><font color=red>Rate to be applied</font></th>
        <th>LOC Status / Comments</th>
    </tr>

<? while($row = $loads->fetch(PDO::FETCH_ASSOC)) { ?>
    <tr>
        <td><input type="checkbox" name="checkbox[]" id="checkbox[]" value="<? echo $row['loadnumber']; ?>"></td>
        <td><? echo $row['sarrive']; ?></td>
        <td><input type="radio"  <? if($row['parkinglot']==="yes"){echo "checked='checked'";} ?> disabled >&nbsp;</td>
        <td><input type="text" name="correctedloadnumber<? echo $row['loadnumber']; ?>" id="correctedloadnumber<? echo $row['loadnumber']; ?>" value="<? echo $row['loadnumber']; ?>" class="inputsmall"></td>
        <td>
            <SELECT name="correctedtrailer<? echo $row['loadnumber']; ?>" id="correctedtrailer<? echo $row['loadnumber']; ?>"  class="selectnarrow"> 
            <OPTION value="<? echo $row['trailer']; ?>" selected ><? echo $row['trailer']; ?></option>
            <option>
            <?=$optionstrailer?> 
            </option>
            </SELECT> 
        </td>
            <td><input type="text" name="correctedweight<? echo $row['loadnumber']; ?>" id="correctedweight<? echo $row['loadnumber']; ?>" value="<? echo $row['weight']; ?>" class="inputsmall"></td>
        <td>
            <SELECT name="correctedsource<? echo $row['loadnumber']; ?>" id="correctedsource<? echo $row['loadnumber']; ?>"  class="selectnarrow"> 
            <OPTION value="<? echo $row['source']; ?>" selected ><? echo $row['source']; ?></option>
            <option>
            <?=$optionssource?> 
            </option>
            </SELECT> 
        </td>
        <td>
            <SELECT name="correcteddestination<? echo $row['loadnumber']; ?>" id="correcteddestination<? echo $row['loadnumber']; ?>"  class="selectnarrow"> 
            <OPTION value="<? echo $row['destination']; ?>" selected ><? echo $row['destination']; ?></option>
            <option>
            <?=$optionsdestination?> 
            </option>
            </SELECT> 
        </td>
        <td>
            <SELECT name="correctedcycletype<? echo $row['loadnumber']; ?>" id="correctedcycletype<? echo $row['loadnumber']; ?>"  class="selectnarrow"> 
            <OPTION value="<? echo $row['cycletype']; ?>" selected ><? echo $row['cycletype']; ?></option>
            <option>
            <?=$optionscycle?> 
            </option>
            </SELECT> 
        </td>
        <td>
            <SELECT NAME="rate<? echo $row['loadnumber']; ?>" id="rate<? echo $row['loadnumber']; ?>" class="select"> 
            <OPTION VALUE=0 >
            <?=$optionsrate?> 
            </option>
            </SELECT> 
        </td>
        <td><? if($row['adminstatus']="approvereject"){ if(isset($row['approvedby'])){echo "Rejected by<font color=red> ".$row['approvedby']."</font>:  ".$row['lmcomments'];}}  ?></td>    </tr>
<? } ?>
</table>

<input type="submit" name="testupdate" id="testupdate" value="Updated selected">
<input type="submit" name="park" id="park" value="Park Selected">

</form>
<form name="form1" id="form1" action="bsassigncosts.php" method="post">
<table id="hor-minimalist-a">
    <tr>
        <th></th>
        <th>Date & Time</th>
        <th><font color=red>Trailer</font></th>
        <th><font color=red>Load Number</font></th>
        <th><font color=red>Weight</font> kg's</th>
        <th><font color=red>Source</font></th>
        <th><font color=red>Destination</font></th>
        <th><font color=red>Cycle Type</font></th>
        <th><font color=red>Rate to be applied</font></th>
        <th>LOC Status / Comments</th>
    </tr>
<? while($row = $loads->fetch(PDO::FETCH_ASSOC)) { ?>
    <tr>
        <td><input type="checkbox" name="checkbox[]" id="checkbox[]" value="<? echo $row['loadnumber']; ?>"></td>
        <td><? echo $row['sarrive']; ?></td>
        <td>
            <SELECT name="correctedtrailer<? echo $row['loadnumber']; ?>" id="correctedtrailer<? echo $row['loadnumber']; ?>"  class="selectnarrow"> 
            <OPTION value="<? echo $row['trailer']; ?>" selected ><? echo $row['trailer']; ?></option>
            <option>
            <?=$optionstrailer?> 
            </option>
            </SELECT> 
        </td>   
        <td><input type="text" name="correctedloadnumber<? echo $row['loadnumber']; ?>" id="correctedloadnumber<? echo $row['loadnumber']; ?>" value="<? echo $row['loadnumber']; ?>" class="inputsmall"> </td>
        <td><input type="text" name="correctedweight<? echo $row['loadnumber']; ?>" id="correctedweight<? echo $row['loadnumber']; ?>" value="<? echo $row['weight']; ?>" class="inputsmall"> </td>

        <td><? if($row['adminstatus']="approvereject"){ if(isset($row['approvedby'])){echo "Rejected by<font color=red> ".$row['approvedby']."</font>:  ".$row['lmcomments'];}}  ?></td>




    </tr>
<? } ?>
</table>
</form>
<td>
    <SELECT name="correctedsource<? echo $row['loadnumber']; ?>" id="correctedsource<? echo $row['loadnumber']; ?>"  class="selectnarrow"> 
    <OPTION value="<? echo $row['source']; ?>" selected ><? echo $row['source']; ?></option>
    <option>
    <?=$optionssource?> 
    </option>
    </SELECT> 
</td>