una pregunta... y pq si haces el query y preguntas cuantas filas hay.... se va a equivocar....
osea, si hay 6 filas... y el hace el rad de 1,6 , no creo que pueda da error nunca... digo yo?
igual no entendi la pregunta...
yo loque haria seria esto
Código PHP:
<?php
if (mysql_num_rows($resp2) !== 0) {
$datos = mysql_fetch_array($resp2);
echo "<a href=$datos[url] target=_blank><img src=$datos[img] alt=$datos[alt]></a>";
}
echo "<META HTTP-EQUIV=Refresh CONTENT=3;URL=home.php>ERROR, NO SE ENCONTRO NINGUNO"//recargamos la web otra vez
exit;//temino el script
?>