tube un error en la escritura de un codigo php, agradeceria su ayuda. Les paso el codigo:
Código PHP:
<?php
include('config.php');
$estados = mysql_query("
SELECT *
FROM estados
ORDER BY id DESC
LIMIT 13
");
$function['estados'] = array();
while ($row = mysql_fetch_assoc($estados))
$function['estados'][] = array(
'usuario' => $row['usuario'],
);
mysql_free_result($estados)or die(mysql_error());
foreach ($function['estados'] as $v){
$userno = ''.$v['usuario'].'';
global $userno;
include('imagen.php?username='$userno);
echo'<b>text16</b>';
}
?>
Cita:
y el codigo de imagen.php es:Warning: include(imagen.php?username=marcoss2009) [function.include]: failed to open stream: No such file or directory in C:\AppServ\www\home.php on line 20
Warning: include() [function.include]: Failed opening 'imagen.php?username=marcoss2009' for inclusion (include_path='.;C:\php5\pear') in C:\AppServ\www\home.php on line 20
Warning: include() [function.include]: Failed opening 'imagen.php?username=marcoss2009' for inclusion (include_path='.;C:\php5\pear') in C:\AppServ\www\home.php on line 20
Código PHP:
<?php
/* imagenes de usuarios */
include('config.php');
$username = $_GET['username'];
$sql = mysql_query("SELECT * FROM usuarios WHERE username='".$username."'");
$row = mysql_fetch_array($sql);
echo'<img src="'.$row['image'].'" width="24">';
?>