提交表单按钮不起作用

时间:2016-09-04 11:20:55

标签: html forms input submit

我的表单不会像它应该提交

我发现<table>内可能有一个<form>,所以这不应该是问题吗?

<from action="pages/save.php" method="post">
        <table class="table table-condensed">
            <tr>
                <td>Name:</td>
                <td>
                    <input name='name' class="form-control" type="text" value="<?php echo ucfirst($result['name']);?>" />
                </td>
            </tr>
            <tr>
                <td>Id:</td>
                <td>
                    <input name='id' class="form-control" disabled type="text" value="<?php echo ucfirst($result['id']);?>" />
                </td>
            </tr>
            <tr>
                <td>Product #:</td>
                <td>
                    <input name='productNumber' class="form-control" type="text" value="<?php echo ucfirst($result['productNumber']);?>" />
                </td>
            </tr>
            <tr>
                <td>Size:</td>
                <td>
                    <input name='size' class="form-control" type="text" value="<?php echo ucfirst($result['size']);?>" />
                </td>
            </tr>
            <tr>
                <td>Color:</td>
                <td>
                    <input name='color' class="form-control" type="text" value="<?php echo ucfirst($result['color']);?>" />
                </td>
            </tr>
            <tr
                <?php if($result['storage']<$result['storageWarningAmount']){echo "class='danger'";}?>>
                <td>Storage:</td>
                <td>
                    <input name='storage' class="form-control" disabled type="text" value="<?php echo ucfirst($result['storage']);?>" />
                </td>
            </tr>
            <tr>
                <td>Storage warning amount:</td>
                <td>
                    <input name='storageWarningAmount' class="form-control" type="text" value="<?php echo ucfirst($result['storageWarningAmount']);?>" />
                </td>
            </tr>
            <tr>
                <td>Image path:</td>
                <td>
                    <input name='imgPath' class="form-control" type="text" value="<?php echo $result['imgPath'];?>" />
                </td>
            </tr>
            <tr>
                <td>Date added:</td>
                <td>
                    <input name='dateAdded' class="form-control" disabled type="text" value="<?php echo ucfirst($result['dateAdded']);?>" />
                </td>
            </tr>
            <tr>
                <td>Date last updated:</td>
                <td>
                    <input name='dateLastUpdated' class="form-control" disabled type="text" value="<?php echo ucfirst($result['dateLastUpdated']);?>" />
                </td>
            </tr>
        </table>
        <input type="submit" class="btn btn-info" value="Save"/>
        <input type="hidden" name="token" value="<?php echo Token::generate()?>" />
    </from>

我尝试了一切。

我没有任何这种形式的js

$ result在页面顶部生成并具有正确的值

pages / save.php存在

1 个答案:

答案 0 :(得分:2)

你将<form>拼错为<from>。这可以由a validator获取。