Los problemas que me da el script son:
1) scroll: esta a la derecha donde dice ultimas novedades, basicamente es una consulta sql que noticias de la base de datos y las muestra en forma de un scroll, pero cuando subo el archivo al servidor, no muestra nada :S...
2) la parte donde dice Noticias, que son las ultimas dos noticias ingresadas...
me parece raro que ande en el localhost y no en el servidor, espero que alguien me pueda dar ayuda porque ya nose que hacer.
el error que tira es este:
Noticias
Código PHP:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/macnamar/public_html/index4.php on line 183
Código PHP:
while($columnanoticias=mysql_fetch_array($rsnoticias3)){
aca dejo los codigos fuente:
1)
primero pongo el iframe que toma el codigo
Código PHP:
<iframe id="datamain" src="external.php" width="143" height="134" marginwidth="0" marginheight="0" hspace="0" vspace="3" frameborder="0" scrolling="no"> </iframe>
Código PHP:
<?php include("base.php"); ?>
<html>
<LINK href="futuro.css" type=text/css rel=stylesheet>
<body bgcolor="#EFEFE7" style="background-color: #EFEFE7">
<div id="datacontainer" style="position:absolute;left:0;top:10;width:127" onMouseover="scrollspeed=0" onMouseout="scrollspeed=cache">
<?php
$resultadonoticias = mysql_query("Select * from contenidos",$conexion);
while($columnanoticias = mysql_fetch_array($resultadonoticias)) {
echo "<br><p style='margin-top: 0; margin-bottom: 0'></p>";
echo "<p align='left' style='margin-top: 0; margin-bottom: 0'><strong><font face='Verdana' size='1' color='#990099'><small>".$columnanoticias['Nombre_Contenido']." </font></small></strong></p>";
echo "<p align='left' style='margin-top: 0; margin-bottom: 0'>
<font size='1' face='Verdana'>".$columnanoticias['Descripcion_Contenido']."</font></p>";
echo "<p align='left' style='margin-top: 0; margin-bottom: 0'><font color='#378CB3'>
.............................................</font></p>";
}
?>
<div>
<font face="Verdana" size="1">
<p style="margin-top: 0; margin-bottom: 0">
<script language="JavaScript1.2">
var scrollspeed=cache=1
function initialize(){
marqueeheight=document.all? parent.document.all.datamain.height : parent.document.getElementById("datamain").getAttribute("height")
dataobj=document.all? document.all.datacontainer : document.getElementById("datacontainer")
dataobj.style.top=5
thelength=dataobj.offsetHeight
scrolltest()
}
function scrolltest(){
dataobj.style.top=parseInt(dataobj.style.top)-scrollspeed
if (parseInt(dataobj.style.top)<thelength*(-1))
dataobj.style.top=5
setTimeout("scrolltest()",50)
}
window.onload=initialize
</script>
</font>
</div></div></body>
</html>
Código PHP:
<div style="padding-top:19px;padding-left:17px ; width:276; height:1">
<p style="margin-top: 0; margin-bottom: 0">
<b><font size="1">Noticias</font></b>
<?
switch($ID_Contenido){
case 'noticia':
$rsnoticias1= mysql_query("SELECT * FROM Contenidos where ID_Contenido='$ID_Contenido'");
$columnanoticias1=mysql_fetch_array($rsnoticias3);
?><span class="MsoNormal" style="margin-bottom: 0">
<?
break;
default:
$rsnoticias3= mysql_query("SELECT * FROM Contenidos where Inicial='si' order by ID_Contenido desc limit 2 ");
while($columnanoticias=mysql_fetch_array($rsnoticias3)){
?>
</span></div></td>
<td width="189" height="1"></td>
</tr>
</table>
</TD>
</TR>
<TR>
<TD background="images/bak1.gif" WIDTH=465 HEIGHT=100% >
<table width="465" border="0" cellspacing="0" cellpadding="0" height="1">
<!--DWLayoutTable-->
<tr>
<td width="276" height="36" valign="top">
<div style="padding-top:0px;padding-left:17px;padding-right:12px ; width:276; height:22">
<p align="justify" style="margin-top: 0; margin-bottom: 0"><img src="images/3pic3.gif" align="left" width="35" height="28">
<span style="margin-top: 0; margin-bottom: 0"><b><font color="#E54646"> <? echo $columnanoticias['Nombre_Contenido']; ?></font></b></span> <br>
<? echo nl2br($columnanoticias['Descripcion_Contenido']); ?><a href="?contenido=noticia&ID_Contenido=<?php echo $columnanoticias['ID_Contenido'];?>"> mas </a>
<span class="MsoNormal" style="margin-top: 0; margin-bottom: 0"><span ><font color="#005B8E" size="1">
<? }
break;
}
?>
</font></span></span></div></td>
Muchisimas gracias, espero que alguien me pueda ayudar...