Ver Mensaje Individual
  #4 (permalink)  
Antiguo 13/07/2009, 17:08
_leproso_
 
Fecha de Ingreso: mayo-2009
Mensajes: 50
Antigüedad: 15 años
Puntos: 1
Respuesta: Conexion php a mysql en 000webhost?

Cita:
Iniciado por franko1809 Ver Mensaje
Asi esta y sigue igual no sepor que no aparecieron esas comillas al inciar el post.
He creado un nueva base de datos y nada
Código PHP:
<html> 
<head> 
<title>Reporte de Ciudades</title> 
</head> 
<body> 
<h1>Reporte de Ciudades</h1> 
<table border="1"> 
<tr> 
<td>ID Ciudad</td> 
<td>Nombre</td> 
</tr>  

<?php 
$conexion 
mysql_connect('mysql8.000webhost.com','a3616285_word','133778'); 
mysql_select_db('a3616285_word'$conexion); 
$tabla mysql_query('SELECT * FROM ciudades'); 
while (
$registro mysql_fetch_array($tabla))  
{   
?> 
<tr> 
<td><?php echo $registro['id']; ?></td> 
<td><?php echo $registro['nombre']; ?></td> 
</tr>  
<?php 

mysql_free_result($tabla); 
mysql_close($conexion); 
?> 
</table> 
</body> 
</html>
te falto poner la variable $conexion

saludos