Ver Mensaje Individual
  #5 (permalink)  
Antiguo 27/03/2014, 07:53
cafeteraexpress_8
 
Fecha de Ingreso: marzo-2014
Mensajes: 6
Antigüedad: 10 años, 1 mes
Puntos: 0
Respuesta: Barra de búsqueda

Éste es el código

<html>
<head>
<title>Agenda</title>
</head>
<meta name="viewport" content="width=device-width; height=device-height; maximum-scale=1.4; initial-scale=1.0; user-scalable=yes"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<body>

<form action="form.php" method="post">
<p>Nombre: <input type="text" name="" /><input type="submit" value="Buscar" /></p>
</form>

<?php
//Crear conexión
$conexion = new mysqli('host', 'usuario', 'contraseña', 'base_de_datos');


// Comprobar la conexión
if (mysqli_connect_errno ($conexion))
{
echo "No se pudo conectar a MySQL: " . mysqli_connect_error ();
}

$result = mysqli_query($conexion,"SELECT * FROM Nombres ORDER BY nombre_nombres ASC");

while($row = mysqli_fetch_array($result))
{
$enlace = $row[enlace_nombres];

echo "<td> <input type='submit' name='Submit' value='$row[nombre_nombres]' action= '$enlace' method='POST'/> </td> <br/> <br/>";

}

?>

</body>
</html>