Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

133
Visualizações
delete confirmation message on anchor tag

As a new learner, i have some basic problems which i want to clear out. 1)i have shown student data, in tabular format. 2)in the last of below code i have provided two anchor tags. 3)among them first one redirects on update page whether the second one directly executes delete query on click without confirmation). so what i want ,when i click on delete link, browser should ask me for confirmation, if yes, then delete and redirect to login page. if no, stay on same page

        >>    <tr>
          <td><?php echo $result['id']; ?></td>
          <td><?php echo $result['sname'];?></td>
          <td><?php echo $result['class']; ?></td>
          <td><?php echo $result['gname'];?></td>
          <td><?php echo $result['contact']; ?></td>
          <td><?php echo $result['gender']; ?></td>
          <td><?php echo $result['email'];?></td>
          <td><?php echo $result['bloodg']; ?></td>
          <td><?php echo $result['address']; ?></td>
          <td><?php echo $result['division'];?></td>
          <td><?php echo $result['shift']; ?></td>
          <td>
            <a class= "action-e" href= "update.php?id=<?php echo $result['id']; ?>"><i class="fa fa-wrench" title="Update"></i></a>
            <a class= "action-d" href= "delete.php?id=<?php echo $result['id'] ?>"><i class="fa fa-trash" title="Delete"></i></a>
          </td>
        </tr>
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

 <tr>
      <td><?php echo $result['id']; ?></td>
      <td><?php echo $result['sname'];?></td>
      <td><?php echo $result['class']; ?></td>
      <td><?php echo $result['gname'];?></td>
      <td><?php echo $result['contact']; ?></td>
      <td><?php echo $result['gender']; ?></td>
      <td><?php echo $result['email'];?></td>
      <td><?php echo $result['bloodg']; ?></td>
      <td><?php echo $result['address']; ?></td>
      <td><?php echo $result['division'];?></td>
      <td><?php echo $result['shift']; ?></td>
      <td>
        <a class="action-e" href="update.php?id=<?php echo $result['id']; ?>"><i class="fa fa-wrench" title="Update"></i></a>
        <a class="action-d" href="delete.php?id=<?php echo $result['id'] ?>" onclick="return confirm('Are you sure?')"><i class="fa fa-trash" title="Delete"></i></a>
      </td>
    </tr>
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda