$link = Conectarse();
$consulta = "SELECT * FROM banner";
$result = mysql_query($consulta) or die("La siguiente consulta contiene algún error:
nSQL: $consulta"); $rows = mysql_fetch_array($result); if($rows['tipo'] == 'flash'){ ?> } else { if($rows['tipo'] == 'img'){ $url = $rows['url']; $string = 'http://'; $posicion = strpos($url,$string); if( $posicion === false) { $url = "http://".$url; } ?> " alt=" echo $rows['nombre'];?>" id="imgBanner"/> } }?> |