Ver Mensaje Individual
  #1 (permalink)  
Antiguo 21/04/2005, 08:06
jmcj
 
Fecha de Ingreso: diciembre-2003
Mensajes: 77
Antigüedad: 20 años, 4 meses
Puntos: 0
Porque no cargo variables de php?????

Hola a todos, despues de estar peleando con php para ver como mostraba los datos de una bbdd mysql y almacenarlos en variables, ahora viene el problema de que no puedo cargar esas variables desdes flash, y no entiendo el porque

Pues bien, yo en php tengo este código :

<?
$noticia[1]["ID"] = "";
$noticia[1]["Titular"] = "";
$noticia[1]["Fecha"] = "";
$noticia[1]["URL"] = "";

$noticia[2]["ID"] = "";
$noticia[2]["Titular"] = "";
$noticia[2]["Fecha"] = "";
$noticia[2]["URL"] = "";

$noticia[3]["ID"] = "";
$noticia[3]["Titular"] = "";
$noticia[3]["Fecha"] = "";
$noticia[3]["URL"] = "";

$noticia[4]["ID"] = "";
$noticia[4]["Titular"] = "";
$noticia[4]["Fecha"] = "";
$noticia[4]["URL"] = "";

$noticia[5]["ID"] = "";
$noticia[5]["Titular"] = "";
$noticia[5]["Fecha"] = "";
$noticia[5]["URL"] = "";

$i = 1;
$n_noticias = 0;

//Conectem a la bdd
include("Includes/conectar.inc");

//Arreplegem les cinc dades que volem
$noticia_bdd = mysql_query("SELECT * FROM alvarolozano ORDER BY fecha DESC", $conexion);
while (($fila = mysql_fetch_array($noticia_bdd)) && $i <= 5) {
$noticia[$i]["ID"] = $fila["id"];
$noticia[$i]["Titular"] = $fila["titular"];
$noticia[$i]["Fecha"] = $fila["fecha"];
$noticia[$i]["URL"] = $fila["url"];
$i++;
}
$n_noticias = $i;

include("Includes/desconectar.inc");
?>

<body bgcolor="#CCCCCC">
<div align="center">

<p><font size="7">E<font size="6">L</font> S<font size="6">ITIO</font> W<font size="6">EB</font>
D<font size="6">E</font> &Aacute;<font size="6">LVARO</font> L<font size="6">OZANO</font></font></p>
<p><font size="5"><strong>NOTICIAS</strong></font></p>
<p>&nbsp;</p>
<table width="70%" border="1" bgcolor="#FFFFFF">
<tr>
<td><table width="100%" border="0">
<tr bgcolor="#999999">
<td> <div align="center"><strong>ID</strong></div></td>
<td> <div align="center"><strong>Titular</strong></div></td>
<td> <div align="center"><strong>Fecha</strong></div></td>
<td> <div align="center"><strong>URL</strong></div></td>
</tr>
<tr>
<td height="2" colspan="4"><hr></td>
</tr>
<?
for($i=1; $i <= $n_noticias; $i++) {
echo "<tr>";
echo "<td>" . $noticia[$i]["ID"] . "</td>";
echo "<td>" . $noticia[$i]["Titular"] . "</td>";
echo "<td>" . $noticia[$i]["Fecha"] . "</td>";
echo "<td>" . $noticia[$i]["URL"] . "</td>";
echo "</tr>";
}
?>


Y lo que quiero es que desde flash poder cargar en 5 campos de texto las variables noticia1,noticia2,noticia3,noticia4 y noticia5, en concreto el campo fecha.

Mi pregunta es si esta bien este php porque no cargo nada desde flash, o a ver si esque estoy cargando mal las variables desde el flash, pero he mirado distintos tutorialillos y uso el loadvars.

Bueno, no se si me he explicado pero espero que alguien pueda ayudarme
¿como cargo esas variables en flash?

Gracias