hello I have a problem I want to select in a data case a column by measure of a form and the selected one print it
introducir el código aquí<html><head>
<link rel="stylesheet" href="CSS/principal.css" type="text/css">
</head>
<body>
<form action="tabla_borrar.php" method="POST">
<p>Buscar Para borrar Por:</p>
<p>nombre <input type="radio" name="Buscar" value="nombre"/></p>
<p>precio<input type="radio" name="Buscar" value ="precio"/></p>
<p>id<input type="radio" name="Buscar" value="id"/></p>
<input type="reset" value="Borrar"> <input type="submit"><br><br><br>
<a href="index.php">DEVOLVER A EL FORMULARIO </a>
</form>
</body>
</html>
code to print the table
<link rel="stylesheet" href="CSS/principal.css" type="text/css">
<?php
$link = mysqli_connect("localhost","root","");
mysqli_select_db($link,"db1") or die ("Error al conectar a la base de
Datos");
$buscar = $_POST['Buscar'];
$query=mysqli_query($link, "SELECT ".$buscar.",codigo FROM tal1 ");
?>
<html>
<body>
<h1>Eliminacion de Productos</h1>
<form method="POST" >
<table border="1" bgcolor="gray">
<tr>
<th colspan="2">Eliminar</th>
</tr>
<?php
while($arreglo=mysqli_fetch_array($query)){
?>
<tr>
<th><input type="checkbox" name="casilla[]" value="<?php echo
$arreglo['codigo'] ; ?>"></th>
<th><?php echo $arreglo[$buscar] ;?></th>
</tr>
<?php
}
?>
</table>
<input type="submit" value="Eliminar">
</form>
<a href="index.php">DEVOLVER A EL FORMULARIO </a>
</body>
</table>