drhqkz3455 2014-11-18 21:33
浏览 28
已采纳

html文件中的两个php脚本..包括一个不显示的php

I'm trying to create a simple form to show a basic table and a delete query... I can get the delete query working but when I use an include it does not work, if i run the 'display.php' file alone in browser it runs perfectly and shows the database...

Can anyone advise what would be best way incorporate the display.php file in this html file? Or explain the issue?

<!DOCTYPE html>



        <div id="content">
            <?php include('display.php')?>

            <div id="sidebar"></div>

            <div id="footer">
                <h5></h5>
            </div>

            <table>
                <tr>
                    <td>
                        <form action="delete.php" method="post"></form>

                        <table border="0" cellpadding="3" cellspacing="1" style="background-color: #536977" width="100%">
                            <tr>
                                <td width="150">Enter Username to be deleted</td>

                                <td width="6">:</td>

                                <td width="294"><input name="delusername" type="text"></td>
                            </tr>

                            <tr>
                                <td>&nbsp;</td>

                                <td>&nbsp;</td>

                                <td><input type="submit" value="submit"></td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
        </div>
    </div>
  • 写回答

1条回答 默认 最新

  • dongshao1981 2014-11-18 21:45
    关注
    <?php  require_once('display.php'); ?>
    

    Presuming they are in the same folder.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?