Ver Mensaje Individual
  #1 (permalink)  
Antiguo 29/01/2011, 01:21
bisho
 
Fecha de Ingreso: marzo-2007
Mensajes: 9
Antigüedad: 17 años, 2 meses
Puntos: 0
Sitio en PHP4 no funciona en PHP5 (porfa urge su ayuda)

Hola.

Acabo de cambiar de hosting y resulta que en este nuevo la versión PHP es 5.2 y el sitio que subi esta hecho en PHP4 conectado a una BD Mysql.

El detalle es que al parecer si se conecta a la BD pero no se ejecutan los links del sitio que se supenen, llama al contenido de la BD para mostrarse en la página, por ej, este es un link del sitio: (http://www.misitio.com/index2.php?proceso=1&widentificacion=124), pero cuando le doy click e ese link, no funciona, solo me regresa a la página inicial, no sé por que, ya que en el hosting anterior funcionaba perfecto: esta es una parte del sitio, que muestra las noticias en la página principal:

Código PHP:
<?php
$indi
="1";
if (
$tope==0){
    
$tope=$cuenta 5;}
    else{
    
$tope=$cuenta 4;
    }

if (
$tope 5){
    
$tope++;
    }

$inicio=$cuenta;
$cuenta=0;
$okis=0;
echo 
'<div align="center" style="color: black; font-family: arial; font-size: 12;">';
switch (
$tarea)
{

  case 
"noticias":
  
$cadenadelquery="select * from pricipal where seccion='NOTICIAS' ORDER BY identificacion DESC";
  
$resultado=mysql_query($cadenadelquery$conexion);
  echo 
mysql_error();
  echo 
"NOTICIAS";
  break;

  default:    
  
$cadenadelquery="select * from principal where seccion='NOTICIAS' ORDER BY identificacion DESC";
  
$resultado=mysql_query($cadenadelquery$conexion);
  echo 
mysql_error();
}
echo 
'</div>';
while (
$row=mysql_fetch_array($resultado)) 
    {
    
$indi++;
    if (
$indi>2){$indi=1;}
    if (
$cuenta $tope){$cuenta++;}    
    
    if (
$cuenta $inicio AND $cuenta $tope){
        if(
$indi==2){
            echo 
'<table width="100%" style="color: black; font-family: arial; font-size: 12;">';
            echo 
'<tr valign="top">';
                echo 
'<td height="2"><img src="cab-new.jpg"></td>';
                echo 
'<td height="2"></td>';
                echo 
'<td height="2"><img src="cab-new.jpg"></td>';
             echo 
' </tr>';
              echo 
'<tr valign="top">';
            
///AQUI VA PRIMER NOT
             
echo ' <td marging-left:10; onMouseOver=this.style.background="#EEF7FF"; onMouseOut=this.style.background="";>';
            
////ABRE PRIMER NOTICIA
            
echo $row["fecha"];
            echo 
'<img src="date.gif">';
            echo 
'<font color="#585858" text-decoration:bold" size="3">';
            echo 
$row["titulo"];
            echo 
'</b><br>';
                                    
$imagen='<img src="'.$row["imagen"].'">';
            echo 
$imagen;
            echo 
'<br>';
            echo 
'</font>';
            echo 
$row["resumen"];
;
      echo
'<br>';
              echo 
' <a href="index2.php?proceso=1&widentificacion='.$row ["identificacion"].'">● noticia completa</a>';
              echo 
'<br>';
              echo 
'<br>';
      
///1CIERRA PRIMER NOTICIA

//            echo '<a href="index.php?cvenot='.$rownot["cvenot"].'&encuestaok='.$encuestaok.'">CONTINUAR...</a>';

//            echo '<form action="" method="post">';
//            echo '<input type="hidden" name="cvenot" value="'.$row["identificacion"].'">';
//            echo '<input type="hidden" name="proceso" value="'.$row["identificacion"].'">';
//            echo '<input type="submit" name="enviar" value="continuar" class="boton">'; 
//            echo '</form>';


            
echo '</font>';
            echo 
'</font>';
            echo 
'</div>';
            echo 
'</td>';
            
////DIVISION DE COLUMNA
             
echo'<td width="158">&nbsp;</td>';
             
////DIVISION DE COLUMNA
                 ///AQUI VA PRIMER NOT
                
}
                if(
$indi==1){
                
///AQUI VA SEGUNDA NOT
            
echo '<td onMouseOver=this.style.background="#EEF7FF"; onMouseOut=this.style.background="";>';
            echo 
$row["fecha"];
            echo 
'<img src="date.gif">';
            echo 
'<font color="#585858" text-decoration:bold" size="3">';
            echo 
$row["titulo"];
            echo 
'</b><br>';
                                    
$imagen='<img src="'.$row["imagen"].'">';
            echo 
$imagen;
            echo 
'<br>';
            echo 
'</font>';
            echo 
$row["resumen"];

//            echo '<a href="index.php?cvenot='.$rownot["cvenot"].'&encuestaok='.$encuestaok.'">CONTINUAR...</a>';
//            echo '<form action="" method="post">';
//            echo '<input type="hidden" name="cvenot" value="'.$row["identificacion"].'">';
//            echo '<input type="hidden" name="proceso" value="'.$row["identificacion"].'">';
//            echo '<input type="submit" name="enviar" value="continuar" class="boton">'; 
//            echo '</form>';

      
echo'<br>';
      echo
'$actionqty=$_POST['actionqty']';
              echo 
' <a href="index2.php?proceso=1&widentificacion='.$row ["identificacion"].'">● noticia completa</a>';
              echo 
'<br>';
            echo 
'</font>';
            echo 
'</div>';
            echo 
'<br>';
            echo 
'</td>';
            
///AQUI VA SEGUNDA NOT
            
echo '</tr>
              '
;
            echo 
'</table>';

}
            
///1CIERRA SEGUNDA NOTICIA

    
}
    } 
// cierra el while
$cuenta=$cuenta-1;
if (
$cuenta==5){$cuenta=4;}
echo 
'<table width="100%">';
echo 
'<tr>';
echo 
'<td>';
$tope=$cuenta +4;
echo 
'<div align="left">';
echo 
'<font size="4">';
echo 
' <a href="index2.php?cuenta='.$cuenta.'&tope='.$tope.'"><img src="back-new.jpg" border="0"></a>';
if (
$cuenta 6){echo '-';echo '<a href="javascript:history.go(-1)"><img src="avanzar-new.jpg" border="0" /></a>';}
echo 
'</font>';
echo 
'</div>
'
;
echo 
'</td>';
echo 
'</tr>';
echo 
'</table>';

/*
$cuenta=$cuenta-1;
if ($cuenta==13){$cuenta=12;}
echo '<table width="100%">';
echo '<tr>';
echo '<td>';
$tope=$cuenta +12;
echo '<div align="center">';
echo '<font size="3">';
if ($cuenta > 14){echo '<a href="javascript:history.go(-1)">Regresar</a> ::: ';}
echo ' <a href="index.php?cuenta='.$cuenta.'&tope='.$tope.'">Noticias Anteriores</a>';
echo '</font>';
echo '</div>';
echo '</td>';
echo '</tr>';
echo '</table>';
*/

?>
Se supone que ahí me muestra los títulos de las 4 ultimas noticias, pero al darle click en "noticia completa" debe de abrir la noticia que precisamente esta alojada en la BD, pero no hace nada, solo me refresca la página inicial.

Por fa necesito, me urge su ayuda, no tengo ni idea de que pasa o si tenga que pasar todo el código a PHP5...

Gracias !!!!