Company logo
  • Empleos
  • Bootcamp
  • Acerca de nosotros
  • Para profesionales
    • Inicio
    • Empleos
    • Cursos y retos
    • Preguntas
    • Profesores
    • Bootcamp
  • Para empresas
    • Inicio
    • Nuestro proceso
    • Planes
    • Pruebas
    • Nómina
    • Blog
    • Comercial
    • Calculadora

0

104
Vistas
How to delete a row from SQL table using button

I am trying to write a function using php and javascript to delete a row from sql database when a button is clicked in that row. This is my table, so once you click the button in a specific row, it would remove said row using the login_id, but I can't really find a way to get this done.

                        '<td>' . $row['login_id'] . '</td>' .
                        '<td>' . $row['first_name'] . '</td>' .
                        '<td>' . $row['last_name'] . '</td>' .
                        '<td>' . $row['email'] . '</td>' .
                        '<td>' . $row['password'] . '</td>' .
                        '<td>' . $row['is_banned'] . '</td>' .                    
                        '<td>  <button type="button" name="deletebutton" onclick="deletefunction()">Delete</button>  </td>' .
                     '<tr>';

this is what the table looks like

7 months ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos