|
Mostrar Mensajes
|
Páginas: 1 [2]
|
12
|
Programación / PHP / Re: acérrimo mensaje en PHP
|
en: 15 Abril 2010, 05:24 am
|
Gracias Alex@ShellRoot.
Realice el cambio que me indicaste y me envía el mismo mensaje en otra linea.
Parse error: syntax error, unexpected '>' in C:\xampp\htdocs\www\09_CONSULTAS_SELECT_TABLA_AGENDA_GENTE.php on line 16
<html> <body> <?php $db = mysql_connect('localhost', 'root', '') or die("No se puede establecer la conexión con la base de datos"); mysql_select_db("agenda", $db); $result = mysql_query("SELECT nombre, apellidos FROM gente", $db); if ($row = mysql_fetch_array($result)){ echo "<table style=\"border: 4px red dotted;\" border=\"1\"> \n <tr> \n <td><b>Nombre</b></td> \n <td><b>Apellido</b></td> \n; </tr> \n"; do { echo "<tr> \n <td>".$row["nombre"]."</td> \n" <td>".$row["apellidos"]."</td> \n" </tr> \n"; } while ($row = mysql_fetch_array($result)); echo "</table> \n </table> \n"; } else { echo "No se encontraron registros"; } mysql_free_result($result); mysql_close($db); ?> </body> </html>
|
|
|
13
|
Programación / PHP / acérrimo mensaje en PHP
|
en: 15 Abril 2010, 04:45 am
|
Hola a todos, he vuelto después de un parentesis obligado por sobrecarga de trabajo.
Alguien me envío una solución a mi problema y le doy las gracias, copie textualmente las instrucciones que medio y persiste el problema, solicito su ayuda por favor.
Parse error: syntax error, unexpected '>' in C:\xampp\htdocs\www\09_CONSULTAS_SELECT_TABLA_AGENDA_GENTE.php on line 14
<html> <body> <?php $db = mysql_connect('localhost', 'root', '') or die("No se puede establecer la conexión con la base de datos"); mysql_select_db("agenda", $db); $result = mysql_query("SELECT nombre, apellidos FROM gente", $db); if ($row = mysql_fetch_array($result)){ echo "<table style=\"border: 4px red dotted;\" border=\"1\"> \n <tr> \n <td><b>Nombre</b></td> \n <td><b>Apellido</b></td> \n; </tr> \n; do { echo "<tr> \n <td>".$row["nombre"]."</td> \n" <td>".$row["apellidos"]."</td>\n" </tr> \n"; } while ($row = mysql_fetch_array($result)); echo "</table>\n </table> \n"; } else { echo "No se encontraron registros"; } mysql_free_result($result); mysql_close($db); ?> </body> </html>
|
|
|
17
|
Programación / PHP / Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in ........
|
en: 26 Marzo 2010, 23:07 pm
|
Buenas tardes a todos. Estoy empenzado a programar en PHP, y como podrán observar cometo los mismos errores que los demás, me pueden ayudar no detecto el error en el siguiente código, mil gracias.
<html> <body> <?php $db = mysql_connect('localhost', 'root', '') or die("No se puede establecer la conexión con la base de datos"); mysql_select_db("agenda", $db); $result = mysql_query("SELECT nombre, apellidos FROM gente", $db); if ($row = mysql_fetch_array($result)){ echo "<table border = '1'> \n"; echo "<tr> \n"; echo "<td><b>Nombre</b></td> \n"; echo "<td><b>Apellido</b></td> \n"; echo "</tr> \n"; do { echo "<tr> \n"; echo "<td>".$row["nombre"]."</td> \n"; echo "<td>".$row["apellidos"]."</td>\n"; echo "</tr> \n"; } while ($row = mysql_fetch_array($result)); echo "</table> style\="margin-left: 50" echo "</table> \n"; } else { echo "No se encontraron registros"; } mysql_free_result($result); mysql_close($db); ?> </body> </html>
|
|
|
|
|
|
|