Ver Mensaje Individual
  #3 (permalink)  
Antiguo 26/03/2014, 06:48
cafeteraexpress_8
 
Fecha de Ingreso: marzo-2014
Mensajes: 6
Antigüedad: 10 años, 1 mes
Puntos: 0
Respuesta: Crear botón a partir de una tabla

Muchas gracias por responder.

Lo he conseguido pero de otra manera. El código que he puesto es el siguiente:

<html>
<head>
<title>Mi primera página PHP</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>

<?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 nombres_nombres ASC");

while($row = mysqli_fetch_array($result))
{
echo "<td> <input type='submit' name='Submit' value='$row[nombre_nombres]' action='$row[enlace_nombres]'/> </td> <br/>";
}
?>

</body>
</html>

Todo funciona perfectamente, salvo que el botón, por mucho que pinches, no redirige a ningún lado.