Ver Mensaje Individual
  #2 (permalink)  
Antiguo 05/12/2006, 19:50
safe
 
Fecha de Ingreso: enero-2003
Ubicación: Córdoba, Argentina
Mensajes: 1.047
Antigüedad: 22 años
Puntos: 10
Prueba con algo asi:
Código PHP:
<?php
    $link 
mysql_connect('localhost''usuario''clave');
    if (!
$link) {
        die(
'Could not connect to MySQL server: ' mysql_error());
    }
    
$dbname 'db';
    
$db_selected mysql_select_db($dbname$link);
    if (!
$db_selected) {
        die(
'Could not set $dbname: ' mysql_error());
    }
    
    
$query "select nombre,telefono from agenda  ";
        
$res mysql_query ($query);

echo 
"<table> \n"
      
."<tr>\n"
      
."<th>Nombre</th>\n"
      
."<th>Telefono</th>\n"
      
."</tr>\n";

while (
$row mysql_fetch_row ($res)) 
{
  echo 
"<tr>\n"
         
."<td>".$row['nombre']. "</td>\n"
         
."<td>".$row['telefono']. "</td>\n"
         
."</tr> \n"
}

echo 
"</table> \n";
?>
__________________
oohh... quisiera ser godines!!!