Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

132
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda