Ver Mensaje Individual
  #1 (permalink)  
Antiguo 10/07/2008, 08:19
charlyta
 
Fecha de Ingreso: junio-2008
Mensajes: 291
Antigüedad: 15 años, 9 meses
Puntos: 9
error loadvars

Hola, ¿por qué me aparece 'undefined' y no el resultado en el campo de texto?
Código:
funcion = new LoadVars();
        funcion.onLoad = function() {
        campo_de_texto.text = this.noticias;
        };
        funcion.load("getdata.php");


Código PHP:
<?
    $database 
"tiny";
    
$connessione mysql_connect("localhost","root","") or die ("Server non trovato");
        
mysql_select_db($database);
    
    
$query "SELECT * FROM noticias";
    
    
$result mysql_query($query) or die ("Errore nella query");
    
    
$num_rows mysql_num_rows($result);
    
    for(
$i=0;$i<$num_rows;$i++){
    
        
$row mysql_fetch_array($result);        
        
$noticias "noticias$i";
        
$noticias $row['noticias'];
        
        
        
        print(
"&noticias$i=$noticias");
        
    }
    
    
mysql_close($connessione);
    
?>