PHP中If ... Else上的空白输出

时间:2019-03-12 18:15:48

标签: php mysql

我是PHP新手,偶然发现了一个问题。

这是我的代码:

<?php 
                            if (($_GET['marking']) == "Theory") {
                                ?>
                                <h4 class="mt-0 header-title">Please select month to mark/edit Attendance & Internal Assessment</h4>
                                <?php
                            }
                            else {
                                ?>
                                <h4 class="mt-0 header-title">Please select month to mark/edit Attendance</h4>                              
                                <?php                                   
                            }
                            ?>
                        </div>
                        <div class="row">
                        <?php
                        //  echo $openclose;
                            if (isset($_GET['selectedcourseid'])) {
                                if ($openclose == "internals") {
                        ?>
                                        <a href="markattendanceint.php?selectedsubject=<?=$_GET['selectedsubject'];?>&selectedcourseid=<?=$_GET['selectedcourseid'];?>&type=<?=$_GET['type'];?>&selectedmonth=<?=$acceptmonth?>&marking=<?=$_GET['marking'];?>&teacherid=<?=$userid?>"><button type="button" class="btn btn-danger waves-effect waves-light"><?=$acceptmonth?></button></a>
                        <?php }
                                else if ($openclose == "attendance") {
                        ?>
                                    <a href="markattendance.php?selectedsubject=<?=$_GET['selectedsubject'];?>&selectedcourseid=<?=$_GET['selectedcourseid'];?>&type=<?=$_GET['type'];?>&selectedmonth=<?=$acceptmonth?>&marking=<?=$_GET['marking'];?>&teacherid=<?=$userid?>"><button type="button" class="btn btn-danger waves-effect waves-light"><?=$acceptmonth?></button></a>
                        <?php
                                }
                                else if ($openclose == "noresult") {
                                    echo ("Portal closed for your account only. Please contact the AO Office.");
                                }
                                else if ($openclose == "close") {
                                    echo ("Portal closed. Please contact the AO Office.");
                                }
                                else {
                                    echo ("Bhai tumse na ho payega");
                                }
                            }
                        ?>

已将$ openclose设置为用于此情况。但是,无论$ openclose带有什么值,我都无法获得任何输出。没有错误,没有按钮,什么都没有。只是一个空白屏幕。

有人可以帮我吗?

以下是随附的屏幕截图: Blank output

0 个答案:

没有答案