Código PHP:
while($row = mysql_fetch_array($sql)){
$link = 'borrar.php?idtblUsers='.$row['id'];
echo '
<tr>
<td>'.$row["id"].'</td>
<td>'.$row["nombre_completo"].'</td>
<td>'.$row["precio"].'</td>
<td>'.$row["cantidad"].'</td>
<a title="Delete" class="mi_boton" href="'.$link.'" >Delete"</a>
</tr>';
}
O bien,
necesitas algún
Cita: <script>function borrar(id){ /*Algo ajax o similar que llame a 'borrar.php?id='+id*/ }</script>
Pero para que esto funcionara, necesitas importar Jquery
y entonces ya podrías hacer algo como:
Código PHP:
<td><input name="Delete" type="button" onClick="borrar('.$row['id'].')" value="Delete"></td>
y en borrar.php, algo como:
Código PHP:
<?php
require_once("conectar.php");
$link=conectar();
$idtblUsers = $_GET['idtblUsers'];
if ($_GET['idtblUsers']){
mysql_query("delete from tblUsers where idtblUsers=".$_GET['idtblUsers'],$link);
echo 'borrado';
}else{echo 'error';}
?>