复制到另一个页面时,表单不起作用

时间:2014-05-27 07:43:12

标签: php forms copy

<form action="view_gebruiker.php" method="post" style="margin-bottom: 50px;">
    <div style="width: 30em;margin-left:40%;">
        <table>
            <tr>
                <td><input type="hidden" name="GEBRUIKER_ID" id="GEBRUIKER" value="<?php echo $gebruiker->getValueEncoded( 'GEBRUIKER_ID' ); ?>" /></td>
                <td> <input type="hidden" name="start" id="start" value="<?php echo $start ?>" /></td>
            </tr>
                <td>Campus:</td>
                    <td>
                        <select name="campus">
                            <option value="cpg" <?php setSelected("campus", "cpg", $gebruiker, "CAMPUS_ID" ) ?>>Campus Groeninge</option>
                            <option value="cph1" <?php setSelected("campus", "cph1", $gebruiker, "CAMPUS_ID" ) ?>>Campus Harelbeke 1</option>
                            <option value="cph2" <?php setSelected("campus", "cph2", $gebruiker, "CAMPUS_ID" ) ?>>Campus Harelbeke 2</option>
                            <option value="cpk1" <?php setSelected("campus", "cpk1", $gebruiker, "CAMPUS_ID" ) ?>>Campus Kaai</option>
                            <option value="cpp" <?php setSelected("campus", "cpp", $gebruiker, "CAMPUS_ID" ) ?>>Campus Plein</option>
                            <option value="cpz" <?php setSelected("campus", "cpz", $gebruiker, "CAMPUS_ID" ) ?>>Campus Zuid</option>                    
                        </select>
                </td><tr>
                <td>Recht</td>
                <td>
                    <select name="recht">
                        <option value="1" <?php setSelected("recht", "1", $gebruiker, "RECHT_ID" ) ?>>ADMIN</option>
                        <option value="2" <?php setSelected("recht", "2", $gebruiker, "RECHT_ID" ) ?>>INPUT</option>
                    </select>
                </td>
            </tr><tr>
                <td align="left"><label for="naam"<?php validateField( "naam", $missingFields ) ?> >Naam *</label></td>
                <td><input type="text" name="naam" id="naam" value="<?php echo $gebruiker->getValueEncoded( 'naam' ); ?>" /></td>
            </tr><tr>
                <td align="left"><label for="gebruikersnaam"<?php validateField( "gebruikersnaam", $missingFields ) ?> >Gebruikersnaam *</label></td>
                <td><input type="text" name="gebruikersnaam" id="gebruikersnaam" value="<?php echo $gebruiker->getValueEncoded('gebruikersnaam'); ?>" /></td>
            </tr><tr>
                <td <?php validateField('wachtwoord1', $missingFields) ?>>Nieuw wachtwoord: </td>
                <td><input type="password" name="wachtwoord1" align="center" /></td>
            </tr><tr>
                <td <?php validateField('wachtwoord2', $missingFields) ?>>Bevestig Wachtwoord: </td>
                <td><input type="password" name="wachtwoord2" align="center" /></td>
            </tr><tr>
                <td align="center"><input type="submit" name="action" id="saveButton" value="Save Changes" /></td>
                <td><a href="view_gebruikers.php">Terug</a></td>
            </tr>
        </table>
    </div>
</form>

这个表单在一个页面上完美运行,但是当我将它复制到另一个页面时,我什么都没显示。我不知道它可能是什么,我一直在寻找一个小时左右。使用的函数与其他文件中的函数完全相同。

1 个答案:

答案 0 :(得分:0)

将你们的两个文件放在wamp,xamp等www目录所在的目录中,因为PHP脚本除非在服务器上运行,否则不会工作,如果你使用本地服务器wamp,xamp等更好你把脚本和表单文件在www文件夹中重命名为form.php