Good, I want to pass the data that appears in my table to a form on another page, how do I do it with only php? The code I have is:
<?php
include('conexion.php');
include('busqueda.php');
$busqueda = $_GET['buscar'];
$query = "select * from datos where nombre like '%$busqueda%'";
$consulta = pg_query($conexion, $query);
?>
<!DOCTYPE html>
<html>
<head>
<title> Resultados </title>
<style>
table tr td{
text-align: center;
}
table{
width: 80%;
margin-top: 10%;
}
</style>
</head>
<body>
<center>
<form method="POST">
<table border="3">
<tr>
<td> ID </td>
<td> Nombre </td>
<td> Cedula </td>
<td> Curso </td>
<td> Fecha de inicio </td>
<td> Fecha de culminación </td>
</tr>
<?php while($fila = pg_fetch_assoc($consulta)){ ?>
<tr>
<td> <?php echo $fila['id']; ?> </td>
<td> <?php echo $fila['nombre']; ?> </td>
<td> <?php echo $fila['cedula']; ?> </td>
<td> <?php echo $fila['curso']; ?> </td>
<td> <?php echo $fila['inicio']; ?> </td>
<td> <?php echo $fila['fin']; ?> </td>
<td> <input type="submit" name="boton" value="Ver"> </td>
</tr>
<?php } ?>
</table>
</form>
</center>
</body>
</html>
When I input the "View", so that I just sent the data from that section of the table to the form on another page.