Código html:
Ver original<meta http-equiv="content-type" content="text/html; charset=utf8">
Código php:
Ver original<?php
//Convertimos los datos del formulario a cadenas.
$nombre = $_POST['nombre'];
$nombredos = $_POST['nombreact'];
$dire = $_POST['dire'];
$tele = $_POST['tel'];
$ecorreo = $_POST['email'];
$resultados=mysql_query("SELECT * FROM tablacurso WHERE nombre LIKE '%{$nombre}%'", $conexion); nombre='$nombredos',
direccion='$dire',
email='$ecorreo',
telefono='$tele'
WHERE nombre='$nombredos'", $conexion);
//Mostramos el encabezado de los resultados dentro de un formulario que actualizará datos
echo"<form action=ejemplo.php method =post><table border=1 cellspacing=1 cellpadding=1>
<tr>
<td><b>NOMBRE</b></td>
<td><b>DIRECCION</b></td>
<td><b>TELEFONO</b></td>
<td><b>E-MAIL</b></td>
</tr>";
//Creamos el bucle para los resultados
echo"
<tr>
<td><input type=text name=nombreact size=20 maxlength=30 value=$row[nombre]></td>
<td><input type=text name=dire size=20 maxlength=30 value=$row[direccion]></td>
<td><input type=text name=tel size=20 maxlength=30 value=$row[telefono]></td>
<td><input type=text name=email size=20 maxlength=30 value=$row[email]></td>
<td><input type=submit name=boton value=ACTUALIZAR></td>
</tr>";
}
echo"</table></form>";
//Cerramos la conexión con MySQL
?>
[HIGHLIGHT="html"]
Código html:
Ver original
<form action="ejemplo.php" method ="post"> <input type="text" name="nombre" size="20" maxlength="30"> <input type="submit" name="boton" value="ENVIAR">
</html>[HIGHLIGHT="html"]
[/HIGHLIGHT]