RE: [PHP-ES] Iniciandome en PHP/MySQL

From: Date: Fri, 12 Jan 2001 20:10:43 +0000
Subject: RE: [PHP-ES] Iniciandome en PHP/MySQL
References: 1 2 3 4  Groups: php.general.es 
Request: Send a blank email to general-es+get-5754@lists.php.net to get a copy of this message
Hola lista estoy leyendo un tutorial de php y maysql y tratando de hacer los ejemplos de este pero cuando hago el shiguinte <<html> <body> <?php $link = mysql_connect("localhost", "root", ""); mysql_select_db("mydb", $link); $result = mysql_query("SELECT nombre, email FROM agenda", $link); echo "<table border = '1'> \n"; echo "<tr> \n"; echo "<td><b>Nombre</b></td> \n"; echo "<td><b>E-Mail</b></td> \n"; echo "</tr> \n"; while ($row = mysql_fetch_row($result)){ echo "<tr> \n"; echo "<td>$row[0]</td> \n"; echo "<td>$row[1]</td> \n"; remplaza por
echo "<td>".$row["nombre"]."</td> \n"; echo "<td>".$row["email"]."</td> \n";
echo "</tr> \n"; } echo "</table> \n"; ?> </body> </html>


« previous php.general.es (#5754) next »