Hasta el momento lo que he hecho es crear una página donde muestro los datos de la bd y despues pongo un "include" en la variable pero no funciona
Dejo aqui el código del carrusel
Código HTML:
<SCRIPT LANGUAGE="JavaScript"> /*********************************** * http://javascripts.vbarsan.com/ * This notice may not be removed ***********************************/ //-- Begin Scroller's Parameters and message --> //scroller width: change to your own; var wwidth=743; //scroller height: change to your own; var wheight=20; //background color: change to your own; var wbcolor="#CCCC99"; //scroller's speed: change to your own; var sspeed=4; var restart=sspeed; var rspeed=sspeed; //text: change to your own wwholemessage=<? include('titulares.php') ?>; //-- end Parameters and message--> //-- begin: Scroller's Algorithm --> var sizeupw=0;var operbr=navigator.userAgent.toLowerCase().indexOf('opera');if(operbr==-1&&navigator.product&&navigator.product=="Gecko"){var agt = navigator.userAgent.toLowerCase();var rvStart = agt.indexOf('rv:');var rvEnd = agt.indexOf(')', rvStart);var check15 = agt.substring(rvStart+3, rvEnd);if(parseFloat(check15)>=1.8) operbr=0;} function startw(){if(document.getElementById)ns6marqueew(document.getElementById('wslider'));else if(document.all) iemarqueew(wslider);else if(document.layers)ns4marqueew(document.wslider1.document.wslider2);}function iemarqueew(whichdiv){iedivw=eval(whichdiv);iedivw.style.pixelLeft=wwidth;iedivw.innerHTML='<nobr>'+wwholemessage+'</nobr>';sizeupw=iedivw.offsetWidth;ieslidew();}function ieslidew(){if(iedivw.style.pixelLeft>=sizeupw*(-1)){iedivw.style.pixelLeft-=sspeed;setTimeout("ieslidew()",100);}else{iedivw.style.pixelLeft=wwidth;ieslidew();}}function ns4marqueew(whichlayer){ns4layerw=eval(whichlayer);ns4layerw.left=wwidth;ns4layerw.document.write('<nobr>'+wwholemessage+'</nobr>');ns4layerw.document.close();sizeupw=ns4layerw.document.width;ns4slidew();}function ns4slidew(){if(ns4layerw.left>=sizeupw*(-1)){ns4layerw.left-=sspeed;setTimeout("ns4slidew()",100);}else{ns4layerw.left=wwidth;ns4slidew();}}function ns6marqueew(whichdiv){ns6divw=eval(whichdiv);ns6divw.style.left=wwidth;ns6divw.innerHTML='<nobr>'+wwholemessage+'</nobr>';sizeupw=ns6divw.offsetWidth;if(operbr!=-1){operaslider.innerHTML='<nobr>'+wwholemessage+'</nobr>';sizeupw=operaslider.offsetWidth;}ns6slidew();}function ns6slidew(){if(parseInt(ns6divw.style.left)>=sizeupw*(-1)){ns6divw.style.left=parseInt(ns6divw.style.left)-sspeed;setTimeout("ns6slidew()",100);}else{ns6divw.style.left=wwidth;ns6slidew();}} //-- end Algorithm --> </script> </head> <body onload="startw();"> <script language="JavaScript">document.write('<table align="center" border="0" cellpadding="0" cellspacing="0"><td width='+wwidth+'>');if(document.getElementById || document.all){document.write('<div style="position:relative;overflow:hidden;width:'+wwidth+';height:'+wheight+';clip:rect(0 '+wwidth+' '+wheight+' 0);background-color:'+wbcolor+';" onMouseover="sspeed=0;" onMouseout="sspeed=restart">');if(operbr!=-1)document.write('<div id="operaslider" style="position:absolute;visibility:hidden;"></div>');document.write('<div id="wslider" style="position:relative;height:'+wheight+';"></div></div>')}</script> <ilayer width=&{wwidth}; height=&{wheight}; name="wslider1" bgcolor=&{wbcolor};><layer name="wslider2" width=&{wwidth}; height=&{wheight}; onMouseover="sspeed=0;" onMouseout="sspeed=restart"></layer></ilayer></td></tr></table> <!-- end -->
Un saludo!