Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/250.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
我试图在单击链接后在div中包含一个页面,但它不起作用 **students.php页面** *studentsmain.php页面* *addstudents.php页面* 电子邮件地址 密码 文件输入 此处为块级帮助文本示例 看看我 提交_Php_Html_Css - Fatal编程技术网

我试图在单击链接后在div中包含一个页面,但它不起作用 **students.php页面** *studentsmain.php页面* *addstudents.php页面* 电子邮件地址 密码 文件输入 此处为块级帮助文本示例 看看我 提交

我试图在单击链接后在div中包含一个页面,但它不起作用 **students.php页面** *studentsmain.php页面* *addstudents.php页面* 电子邮件地址 密码 文件输入 此处为块级帮助文本示例 看看我 提交,php,html,css,Php,Html,Css,我试图在单击链接后在div中包含一个页面,但它不起作用。我想在单击addstudents链接时在col-md-9 div中包含addstudents.php div。php放在includes文件夹外,另一个文件夹放在includes文件夹内。当我单击addstudents链接时,什么也没有发生实际上get方法正在将替换为。因此,请尝试以下代码: **students.php page** <?php include('includes/students

我试图在单击链接后在div中包含一个页面,但它不起作用。我想在单击addstudents链接时在col-md-9 div中包含addstudents.php div。php放在includes文件夹外,另一个文件夹放在includes文件夹内。当我单击addstudents链接时,什么也没有发生

实际上get方法正在将
替换为
。因此,请尝试以下代码:

 **students.php page**   
     <?php 
        include('includes/studentsheader.php');
        include('includes/studentsmain.php');
        include('includes/getfooter.php');
        ?>  


    *studentsmain.php page*
        <div class="container-fluid">
        <div class="row">
        <div class="col-md-3">
        <ul class="studentslist">
        <li><a href="students.php?addstudents.php">Add Student</a></li>
        <li><a href="students.php?ViewStudent.php">View Student</a></li>
        <li><a href="students.php?UpdateStudent.php">Update Student</a></li>
        <li><a href="students.php?DeleteStudent.php">Delete Student</a></li>
        </ul>
        </div>

        <div class="col-md-9">
        <?php 

        if(isset($_GET['addstudents.php'])) 
        { 
        include('includes/addstudents.php'); 
        } 
        else if(isset($_GET['ViewStudent.php']))    {include('includes/ViewStudent.php');}
        else if(isset($_GET['UpdateStudent.php'])){include('includes/UpdateStudent.php');}
        else if(isset($_GET['DeleteStudent.php'])){include('includes/DeleteStudent.php');}
        ?>
        </div>

        </div>
        </div>

    *addstudents.php page*

    <div class="">
        <form>
      <div class="form-group">
        <label for="exampleInputEmail1">Email address</label>
        <input type="email" class="form-control" id="exampleInputEmail1" placeholder="Email">
      </div>
      <div class="form-group">
        <label for="exampleInputPassword1">Password</label>
        <input type="password" class="form-control" id="exampleInputPassword1" placeholder="Password">
      </div>
      <div class="form-group">
        <label for="exampleInputFile">File input</label>
        <input type="file" id="exampleInputFile">
        <p class="help-block">Example block-level help text here.</p>
      </div>
      <div class="checkbox">
        <label>
          <input type="checkbox"> Check me out
        </label>
      </div>
      <button type="submit" class="btn btn-default">Submit</button>
    </form>
    </div>

去读一下GET parameters如何工作的基础知识。是的,它工作起来了,谢谢艾哈迈德。如果它帮助了你,那么你可以接受答案,这样它将来也会帮助其他人:)
if(isset($_GET['addstudents_php'])) 
{ 
    include('includes/addstudents.php'); 
}