Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/75.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
Php 警告:无法修改标题信息-第29行中的错误已发送标题_Php_Html_Forms_Header - Fatal编程技术网

Php 警告:无法修改标题信息-第29行中的错误已发送标题

Php 警告:无法修改标题信息-第29行中的错误已发送标题,php,html,forms,header,Php,Html,Forms,Header,在configuration.php第6行显示错误。警告:无法修改标题信息-标题已由第29行的/home/midhu/public_html/feedback/config/configuration.php:6 in/home/midhu/public_html/feedback/submit.php中启动的输出发送 1. opendb.php <?php $con = mysql_connect('localhost','midhu_feedback','feedback@123')

在configuration.php第6行显示错误。警告:无法修改标题信息-标题已由第29行的/home/midhu/public_html/feedback/config/configuration.php:6 in/home/midhu/public_html/feedback/submit.php中启动的输出发送

1. opendb.php
<?php
$con = mysql_connect('localhost','midhu_feedback','feedback@123') or die('Error connecting to mysql');
    mysql_select_db(midhu_feedback);
    ?>
        <style>
            a{
                margin-left: 20px;
                padding-left: 20px;
                }
            #table{
                    padding-left:20px;

                }
            #border{
                    border: 2px solid rgb(92, 184, 92) !important;
                    height: 179px;
                    width: 235px;
                }
            h5{
                padding-left:20px;
                }
            #table{
                padding-left:20px;
                  margin-left: 20px;
                }

        </style>

    </head>

<body><br><br>
<div class="container"><br>

            <br><a href="export.php" class="btn btn-success" >EXPORT TO PDF</a><br><br>
            <h5><i> Submitted data successfully... </i></h5><br>
                <div id="table">
                    <table border="1" >



                        <tr>
                                <th>Sl.No</th>
                                <th>Name</th>
                                <th>Mobile</th>
                                <th>Place</th>
                                <th>Class</th>
                                <th>Email</th>
                                <th>College</th>
                                <th>Technologies Interested In</th>
                                <th>Mobile Apps development</th>
                                <th>Feedback</th>
                                <th>Interested To Study Latest Technologies</th>
                        </tr>

                        <tr>
                                <td><?php echo $_GET['id']; ?></td>
                                <td><?php echo $_GET['name']; ?></td>
                                <td><?php echo $_GET['phone']; ?></td>
                                <td><?php echo $_GET['place']; ?></td>
                                <td><?php echo $_GET['class']; ?></td>
                                <td><?php echo $_GET['email']; ?></td>
                                <td><?php echo $_GET['college']; ?></td>
                                <td><?php echo $_GET['technology']; ?></td>
                                <td><?php echo $_GET['mobile']; ?></td>
                                <td><?php echo $_GET['feedback']; ?></td>
                                <td><?php echo $_GET['interested']; ?></td>
                        </tr>

                    </table>
                </div>

</div>

</body>
页面

2.configuration.php

    <?php
                $host='localhost';
                $dbname='midhu_feedback';
                $username='feedback';
                $password='feedback@123';
            ?>   
 3. submit.php


    <?php
                session_start();
                include("../feedback/config/configuration.php");
                include("../feedback/config/opendb.php");
                $sql="insert into feedback(name,mobile,place,class,email,college,technologies_interested_in,mobile_apps_development,feedback,interested_to_study_latest_technologies)values('".$_SESSION["name"]."','".$_SESSION["phone"]."','".$_SESSION["place"]."','".$_SESSION["class"]."','".$_SESSION["email"]."','".$_SESSION["college"]."','".$_SESSION["technology"]."','".$_SESSION["mobile"]."','".$_SESSION["feedback"]."','".$_SESSION["interested"]."')";

                mysql_query($sql);

                $sql="select * from feedback where mobile='".$_SESSION["phone"]."'";
                $result=mysql_query($sql);


                while($row=mysql_fetch_array($result))
                {
                    $id=$row['id'];
                    $name=$row['name'];
                    $phone=$row['mobile'];
                    $place=$row['place'];
                    $class=$row['class'];
                    $email=$row['email'];
                    $college=$row['college'];
                    $technology=$row['technologies_interested_in'];
                    $mobile=$row['mobile_apps_development'];
                    $feedback=$row['feedback'];
                  $interested=$row['interested_to_study_latest_technologies'];


                }
                header('location:display.php?id='.$id.'&name='.$name.'&phone='.$phone.'&place='.$place.'&class='.$class.'&email='.$email.'&college='.$college.'&technology='.$technology.'&mobile='.$mobile.'&feedback='.$feedback.'&interested='.$interested);

            $_SESSION['name'];
            $_SESSION["phone"];
            $_SESSION["place"];
            $_SESSION["class"];
            $_SESSION["email"];
            $_SESSION["college"];
            $_SESSION['technology'];
            $_SESSION['mobile'];        
            $_SESSION['feedback'];
            $_SESSION['interested'];

            $_SESSION["phone"]=$phone;  
        ?>
        <style>
            a{
                margin-left: 20px;
                padding-left: 20px;
                }
            #table{
                    padding-left:20px;

                }
            #border{
                    border: 2px solid rgb(92, 184, 92) !important;
                    height: 179px;
                    width: 235px;
                }
            h5{
                padding-left:20px;
                }
            #table{
                padding-left:20px;
                  margin-left: 20px;
                }

        </style>

    </head>

<body><br><br>
<div class="container"><br>

            <br><a href="export.php" class="btn btn-success" >EXPORT TO PDF</a><br><br>
            <h5><i> Submitted data successfully... </i></h5><br>
                <div id="table">
                    <table border="1" >



                        <tr>
                                <th>Sl.No</th>
                                <th>Name</th>
                                <th>Mobile</th>
                                <th>Place</th>
                                <th>Class</th>
                                <th>Email</th>
                                <th>College</th>
                                <th>Technologies Interested In</th>
                                <th>Mobile Apps development</th>
                                <th>Feedback</th>
                                <th>Interested To Study Latest Technologies</th>
                        </tr>

                        <tr>
                                <td><?php echo $_GET['id']; ?></td>
                                <td><?php echo $_GET['name']; ?></td>
                                <td><?php echo $_GET['phone']; ?></td>
                                <td><?php echo $_GET['place']; ?></td>
                                <td><?php echo $_GET['class']; ?></td>
                                <td><?php echo $_GET['email']; ?></td>
                                <td><?php echo $_GET['college']; ?></td>
                                <td><?php echo $_GET['technology']; ?></td>
                                <td><?php echo $_GET['mobile']; ?></td>
                                <td><?php echo $_GET['feedback']; ?></td>
                                <td><?php echo $_GET['interested']; ?></td>
                        </tr>

                    </table>
                </div>

</div>

</body>
页面

2.configuration.php

    <?php
                $host='localhost';
                $dbname='midhu_feedback';
                $username='feedback';
                $password='feedback@123';
            ?>   
 3. submit.php


    <?php
                session_start();
                include("../feedback/config/configuration.php");
                include("../feedback/config/opendb.php");
                $sql="insert into feedback(name,mobile,place,class,email,college,technologies_interested_in,mobile_apps_development,feedback,interested_to_study_latest_technologies)values('".$_SESSION["name"]."','".$_SESSION["phone"]."','".$_SESSION["place"]."','".$_SESSION["class"]."','".$_SESSION["email"]."','".$_SESSION["college"]."','".$_SESSION["technology"]."','".$_SESSION["mobile"]."','".$_SESSION["feedback"]."','".$_SESSION["interested"]."')";

                mysql_query($sql);

                $sql="select * from feedback where mobile='".$_SESSION["phone"]."'";
                $result=mysql_query($sql);


                while($row=mysql_fetch_array($result))
                {
                    $id=$row['id'];
                    $name=$row['name'];
                    $phone=$row['mobile'];
                    $place=$row['place'];
                    $class=$row['class'];
                    $email=$row['email'];
                    $college=$row['college'];
                    $technology=$row['technologies_interested_in'];
                    $mobile=$row['mobile_apps_development'];
                    $feedback=$row['feedback'];
                  $interested=$row['interested_to_study_latest_technologies'];


                }
                header('location:display.php?id='.$id.'&name='.$name.'&phone='.$phone.'&place='.$place.'&class='.$class.'&email='.$email.'&college='.$college.'&technology='.$technology.'&mobile='.$mobile.'&feedback='.$feedback.'&interested='.$interested);

            $_SESSION['name'];
            $_SESSION["phone"];
            $_SESSION["place"];
            $_SESSION["class"];
            $_SESSION["email"];
            $_SESSION["college"];
            $_SESSION['technology'];
            $_SESSION['mobile'];        
            $_SESSION['feedback'];
            $_SESSION['interested'];

            $_SESSION["phone"]=$phone;  
        ?>
        <style>
            a{
                margin-left: 20px;
                padding-left: 20px;
                }
            #table{
                    padding-left:20px;

                }
            #border{
                    border: 2px solid rgb(92, 184, 92) !important;
                    height: 179px;
                    width: 235px;
                }
            h5{
                padding-left:20px;
                }
            #table{
                padding-left:20px;
                  margin-left: 20px;
                }

        </style>

    </head>

<body><br><br>
<div class="container"><br>

            <br><a href="export.php" class="btn btn-success" >EXPORT TO PDF</a><br><br>
            <h5><i> Submitted data successfully... </i></h5><br>
                <div id="table">
                    <table border="1" >



                        <tr>
                                <th>Sl.No</th>
                                <th>Name</th>
                                <th>Mobile</th>
                                <th>Place</th>
                                <th>Class</th>
                                <th>Email</th>
                                <th>College</th>
                                <th>Technologies Interested In</th>
                                <th>Mobile Apps development</th>
                                <th>Feedback</th>
                                <th>Interested To Study Latest Technologies</th>
                        </tr>

                        <tr>
                                <td><?php echo $_GET['id']; ?></td>
                                <td><?php echo $_GET['name']; ?></td>
                                <td><?php echo $_GET['phone']; ?></td>
                                <td><?php echo $_GET['place']; ?></td>
                                <td><?php echo $_GET['class']; ?></td>
                                <td><?php echo $_GET['email']; ?></td>
                                <td><?php echo $_GET['college']; ?></td>
                                <td><?php echo $_GET['technology']; ?></td>
                                <td><?php echo $_GET['mobile']; ?></td>
                                <td><?php echo $_GET['feedback']; ?></td>
                                <td><?php echo $_GET['interested']; ?></td>
                        </tr>

                    </table>
                </div>

</div>

</body>
页面 display.php

        <style>
            a{
                margin-left: 20px;
                padding-left: 20px;
                }
            #table{
                    padding-left:20px;

                }
            #border{
                    border: 2px solid rgb(92, 184, 92) !important;
                    height: 179px;
                    width: 235px;
                }
            h5{
                padding-left:20px;
                }
            #table{
                padding-left:20px;
                  margin-left: 20px;
                }

        </style>

    </head>

<body><br><br>
<div class="container"><br>

            <br><a href="export.php" class="btn btn-success" >EXPORT TO PDF</a><br><br>
            <h5><i> Submitted data successfully... </i></h5><br>
                <div id="table">
                    <table border="1" >



                        <tr>
                                <th>Sl.No</th>
                                <th>Name</th>
                                <th>Mobile</th>
                                <th>Place</th>
                                <th>Class</th>
                                <th>Email</th>
                                <th>College</th>
                                <th>Technologies Interested In</th>
                                <th>Mobile Apps development</th>
                                <th>Feedback</th>
                                <th>Interested To Study Latest Technologies</th>
                        </tr>

                        <tr>
                                <td><?php echo $_GET['id']; ?></td>
                                <td><?php echo $_GET['name']; ?></td>
                                <td><?php echo $_GET['phone']; ?></td>
                                <td><?php echo $_GET['place']; ?></td>
                                <td><?php echo $_GET['class']; ?></td>
                                <td><?php echo $_GET['email']; ?></td>
                                <td><?php echo $_GET['college']; ?></td>
                                <td><?php echo $_GET['technology']; ?></td>
                                <td><?php echo $_GET['mobile']; ?></td>
                                <td><?php echo $_GET['feedback']; ?></td>
                                <td><?php echo $_GET['interested']; ?></td>
                        </tr>

                    </table>
                </div>

</div>

</body>
启动ob_;到submit.php页面的顶部。在调用header之前有一个输出

        <style>
            a{
                margin-left: 20px;
                padding-left: 20px;
                }
            #table{
                    padding-left:20px;

                }
            #border{
                    border: 2px solid rgb(92, 184, 92) !important;
                    height: 179px;
                    width: 235px;
                }
            h5{
                padding-left:20px;
                }
            #table{
                padding-left:20px;
                  margin-left: 20px;
                }

        </style>

    </head>

<body><br><br>
<div class="container"><br>

            <br><a href="export.php" class="btn btn-success" >EXPORT TO PDF</a><br><br>
            <h5><i> Submitted data successfully... </i></h5><br>
                <div id="table">
                    <table border="1" >



                        <tr>
                                <th>Sl.No</th>
                                <th>Name</th>
                                <th>Mobile</th>
                                <th>Place</th>
                                <th>Class</th>
                                <th>Email</th>
                                <th>College</th>
                                <th>Technologies Interested In</th>
                                <th>Mobile Apps development</th>
                                <th>Feedback</th>
                                <th>Interested To Study Latest Technologies</th>
                        </tr>

                        <tr>
                                <td><?php echo $_GET['id']; ?></td>
                                <td><?php echo $_GET['name']; ?></td>
                                <td><?php echo $_GET['phone']; ?></td>
                                <td><?php echo $_GET['place']; ?></td>
                                <td><?php echo $_GET['class']; ?></td>
                                <td><?php echo $_GET['email']; ?></td>
                                <td><?php echo $_GET['college']; ?></td>
                                <td><?php echo $_GET['technology']; ?></td>
                                <td><?php echo $_GET['mobile']; ?></td>
                                <td><?php echo $_GET['feedback']; ?></td>
                                <td><?php echo $_GET['interested']; ?></td>
                        </tr>

                    </table>
                </div>

</div>

</body>
更多信息请访问:

        <style>
            a{
                margin-left: 20px;
                padding-left: 20px;
                }
            #table{
                    padding-left:20px;

                }
            #border{
                    border: 2px solid rgb(92, 184, 92) !important;
                    height: 179px;
                    width: 235px;
                }
            h5{
                padding-left:20px;
                }
            #table{
                padding-left:20px;
                  margin-left: 20px;
                }

        </style>

    </head>

<body><br><br>
<div class="container"><br>

            <br><a href="export.php" class="btn btn-success" >EXPORT TO PDF</a><br><br>
            <h5><i> Submitted data successfully... </i></h5><br>
                <div id="table">
                    <table border="1" >



                        <tr>
                                <th>Sl.No</th>
                                <th>Name</th>
                                <th>Mobile</th>
                                <th>Place</th>
                                <th>Class</th>
                                <th>Email</th>
                                <th>College</th>
                                <th>Technologies Interested In</th>
                                <th>Mobile Apps development</th>
                                <th>Feedback</th>
                                <th>Interested To Study Latest Technologies</th>
                        </tr>

                        <tr>
                                <td><?php echo $_GET['id']; ?></td>
                                <td><?php echo $_GET['name']; ?></td>
                                <td><?php echo $_GET['phone']; ?></td>
                                <td><?php echo $_GET['place']; ?></td>
                                <td><?php echo $_GET['class']; ?></td>
                                <td><?php echo $_GET['email']; ?></td>
                                <td><?php echo $_GET['college']; ?></td>
                                <td><?php echo $_GET['technology']; ?></td>
                                <td><?php echo $_GET['mobile']; ?></td>
                                <td><?php echo $_GET['feedback']; ?></td>
                                <td><?php echo $_GET['interested']; ?></td>
                        </tr>

                    </table>
                </div>

</div>

</body>

伊茨已经站在了世界之巅page@MidhuT你的问题格式正确吗,因为它看起来像一个单独的文件,代码中的configuration.php和submit.php是什么?我使用configuration.php连接到db。我有一个表单,在提交该表单后,它会转到submit.php。它会将表单数据插入表中,并选择特定的用户数据,然后使用header将其传递到displa.php。请不要使用mysql_*函数它们已弃用,将不再在PHPTH的更高版本中使用。那么,如何从反馈中检索$sql=select*,其中mobile='.$\u SESSION[phone].';resultUse可以使用PDO或mysqli_*函数。我个人更喜欢PDO,但您可以使用类似于mysql函数的mysqli函数。您可以参考mysqlithe中的一些指南。问题是标头没有正确地将while的结果传递给display.php