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.

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

报告相同问题?

悬赏问题

  • ¥15 metadata提取的PDF元数据,如何转换为一个Excel
  • ¥15 关于arduino编程toCharArray()函数的使用
  • ¥100 vc++混合CEF采用CLR方式编译报错
  • ¥15 coze 的插件输入飞书多维表格 app_token 后一直显示错误,如何解决?
  • ¥15 vite+vue3+plyr播放本地public文件夹下视频无法加载
  • ¥15 c#逐行读取txt文本,但是每一行里面数据之间空格数量不同
  • ¥50 如何openEuler 22.03上安装配置drbd
  • ¥20 ING91680C BLE5.3 芯片怎么实现串口收发数据
  • ¥15 无线连接树莓派,无法执行update,如何解决?(相关搜索:软件下载)
  • ¥15 Windows11, backspace, enter, space键失灵