Funziona,funziona,grazie mille ho editato cosi
Codice PHP:
<?php
$random = rand($images);
$random = mysql_query("SELECT photo_id, photo_filename, photo_caption, photo_category, date, user, click, score FROM gallery_photos ORDER BY RAND() ", $cn);
$quanti = mysql_num_rows($random);
if ( $quanti>5) {$k=5;} else {$k=$quanti;}
for($x=0; $x<$k; $x++)
{
$rs = mysql_fetch_row($random);
$photo_id = $rs[0];
$photo_filename = $rs[1];
$photo_caption = $rs[2];
$photo_category = $rs[3];
$date = $rs[4];
$user = $rs[5];
$click = $rs[6];
$score = $rs[7];
$risultato = Array ("id" => array ($photo_id),
"filename" => array ($photo_filename),
"caption" => array ($photo_caption),
"category" => array ($photo_category),
"date" => array ($date),
"user" => array ($user),
"click" => array ($click),
"score" => array ($score),);
?>
<div id="miniature_random">
<a href="<?php echo "galleria.php?direct=1&order=photo_id&gallery=Random&cid=".$risultato["category"][0]."&pid=".$risultato["id"][0]; ?>" rel"nofollow" title="" >
[img]<?php echo $images_dir."/tb_".$risultato["filename"][0]; ?>[/img]' /></a>
<?php echo"
© ".$risultato["user"][0];?></div>
<?php
}
?>
Facevo io l'errore di non mettere parentesi.Grazie ragazzi.
Ciao