Ver Mensaje Individual
  #15 (permalink)  
Antiguo 07/05/2009, 10:19
Avatar de mss_lobaton85
mss_lobaton85
 
Fecha de Ingreso: abril-2009
Ubicación: Buenaventura
Mensajes: 41
Antigüedad: 15 años
Puntos: 0
Respuesta: generar un formulario xml

lo he modificado de esta manera pero ahora no me genera el archivo xml:::



<?php

echo '<?xml version="1.0" encoding="UTF-8"?>';



//AQUI LOS INCLUDES DE CONECCIÓN, VALIDACIÓN DE PERMISOS Y DEMAS

include("C:\carpeta\libreria.php");

ConMySql("bd","localhost");

$sql=mysql_query("select * from tabla");


header("Content-type: text/xml") ;

$campos = mysql_num_fields($sql);
$i=0;

while($i<$campos){
echo mysql_field_name ($sql, $i);

$i++;
}



if ( mysql_num_rows($sql) > 0 )

{
while ( $row = mysql_fetch_array( $sql ) )
{


for($j=0; $j<$campos; $j++) {
echo $row[$j];

}
}
}

?>

como le aplico a este codigo la creacion del xml