Ver Mensaje Individual
  #1 (permalink)  
Antiguo 13/07/2009, 15:31
franko1809
 
Fecha de Ingreso: enero-2008
Ubicación: Lima - Perú
Mensajes: 1.127
Antigüedad: 16 años, 3 meses
Puntos: 10
Conexion php a mysql en 000webhost?

No me puedo conectar a 00webhost y anteriormente si podia acaso se ha modificado al phpmyadmin?
En el server local me funciona bien y al subirlo a 000webhost con los datos de acceso que me dieron me salen estos errores

Código:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/a3616285/public_html/a.php on line 17

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/a3616285/public_html/a.php on line 26
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_db,'clave');
mysql_select_db('
a3616285_db');
$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>