$ _Post无效[未定义索引]

时间:2016-02-27 09:07:43

标签: php post

Giris.php(登录界面)

  <html>
          <form method="post" action="verify.php">
          <p>Birinci Isletim Sistemi:</p> <input type="text" name="txt_biris"><br><br>
          <p>Ikinci Isletim Sistemi:</p> <input type="text" name="txt_ikis"><br>
            <input type="submit" value="Karşılaştır!">
          </form>
                </body>
</html>

Verify.php

    <?php
$ad = $_POST["txt_biris"];
echo"Ad...: $ad";
$sifre = $_POST["txt_ikis"];
echo "Sifre...: $sifre";

它返回..

Error

enter image description here

我尝试了很多方法,控制变量等。但我没有解决它。我在Apache 2.4.17上使用PHP 7。

1 个答案:

答案 0 :(得分:-1)

使用

<?php
if(isset( $_POST["txt_biris"]))
{
    $ad = $_POST["txt_biris"];
    echo"Ad...: $ad";
    $sifre = $_POST["txt_ikis"];
    echo "Sifre...: $sifre";
}