当我完成表单时,弹出窗口仅显示一秒钟,然后再次隐藏

时间:2020-10-05 13:54:20

标签: php html css

我有弹出窗口,它可以正常工作,我需要使用方法post从输入栏获得我的值,但是问题是当我确实在短短一秒钟内形成弹出窗口然后再次隐藏时,我需要单击两次,因为第一次我只有最后结果

<div class="List_modify">
  <table class="list">
    <thead class="topBar">
      <tr>
        <th>Prenom</th>
        <th>Nom</th>
        <th>CIN</th>
        <th>Emails</th>
        <th>Références</th>
        <th>Photos</th>
        <th>Niveau</th>
        <th class="button_editer" style="vertical-align:middle"><span>Editer</span></th>

      </tr>
    </thead>
    <?php $requet = "select * from Etudiants";
            $resultat = mysqli_query($connecte, $requet);
            while ($r = mysqli_fetch_array($resultat)) {
            ?>
    <tbody class="container">
      <tr>
        <td>
          <?php echo $r['Prenom']; ?>
        </td>
        <td>
          <?php echo $r['Nom']; ?>
        </td>
        <td>
          <?php echo $r['CIN']; ?>
        </td>
        <td>
          <?php echo $r['Emails']; ?>
        </td>
        <td>
          <?php echo $r['Matricule']; ?>
        </td>
        <td> <img src="image/<?php echo $r['Photo']; ?> " style="width: 150px; height:150px;"></td>
        <td>
          <?php echo $r['Niveau']; ?> </td>
        <td>
          <form method="POST" action="">

            <input type="hidden" name="id" value="<?php echo $r['Id_Etudiant']; ?>">
            <button class=" button" onclick="show()" style="vertical-align:middle" type="submit" name="submit"><span>Editer<i class=" fas fa-user-edit"></i></span>
            </button>
          </form>
        </td>
      </tr>
    </tbody>
    <?php } ?>
  </table>
</div>
<div class="background_page_modify" id="page_modify" onclick="hide()">
  <div class="page_etudiant" onclick="event.stopPropagation()">
    <div class="closebtn" id="closebtn" onclick="hide()">
      <div class="circle"> +</div>
    </div>
    <div class="etudiant_box">
      <?php
                if (isset($_REQUEST['submit'])) {
                    $checkid = $_REQUEST['id'];
                    echo $checkid;
                }


                ?>
    </div>

  </div>
</div>

0 个答案:

没有答案