单击提交按钮时的PHP白页

时间:2019-03-19 03:01:55

标签: php html variables operators

每当我尝试运行此PHP操作时,都只是打开一个空白页面,不确定该问题。开始时要复杂得多,但是即使简化了代码,即时通讯仍然会出现空白页面。

我一分钟之内在我的网站上提交了大约5份文件,所有文件都正常运行,没有任何问题,因此我对于为什么这个文件表现得非常困惑。

<form action="action/table-action.php" class="tables-cup-form">
      <select name="cupname" required>
        <option value='Holder' disabled selected>Please Select</option> <!--Placeholder for Select-->
          <?php
              while($rows = $resultSet->fetch_assoc()) //Fills select with cup entries in db
              {
                $cupname = $rows['cup_name'];
                echo "  <option value='$cupname'>$cupname</option>";
              }
          ?>
      </select>
        <input type="submit" name="submit" value="Generate" class="submit">
    </form>

这是table-action.php

<?php

 if (isset($_POST['submit'])) { //checking if submit button was clicked

 include_once 'dbcon.php';

 echo "dank";
}


?>

0 个答案:

没有答案
相关问题