Ver Mensaje Individual
  #1 (permalink)  
Antiguo 25/06/2012, 12:50
sjj
 
Fecha de Ingreso: octubre-2008
Mensajes: 213
Antigüedad: 15 años, 4 meses
Puntos: 12
Problema al cargar la pagina

Tengo un pequeño sitio armado en PHP, el cual es una especie de buscador que dependiendo de las opción elegida en un combo select de un formulario redirige a páginas diferentes. Lo estuve probando en Chrome y funciona correctamente. El problema es que cuando la cargo en Mozilla me sale la siguiente leyenda: La página no está redirigiendo adecuadamente. Firefox ha detectado que el servidor está redirigiendo la solicitud a esta dirección de una manera en la que nunca terminará.

Me extraña que este mensaje me salga en Firefox pero no así en el Chrome. ¿A qué puede deberse? Supongo que puede ser por el header del comienzo pero es la forma que utilizo para redirigir. La idea de esta página es recuperar los datos de una base de datos y mostrarlos. La página en que los muestre dependerá de lo elegido en el primer combo select. Liste1 es el nombre del combo select. Así es el código de la página:


Código PHP:
<?php
header
("location:" .$_POST["liste1"]);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script type="text/JavaScript">
<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
</head>

<body onload="MM_preloadImages('../2012/botones/nosotros1.png','../2012/botones/servicios1.png','../2012/botones/modelos1.png','../2012/botones/venta1.png','../2012/botones/faqs1.png','../2012/botones/contacto1.png')">
<table width="1041" height="517" align="center" cellpadding="3" cellspacing="2">
  <tr>
    <td height="138" colspan="5" align="left" bgcolor="#FFFFFF"><table width="1001" height="114" border="0" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF">
      <tr>
        <td width="1001" colspan="2"><table width="1001" height="172" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td width="357" height="92" align="center" bgcolor="#FFFFFF"><img src="../imagenes/auto flash/logo.png" alt="alquila" width="336" height="80" /></td>
            <td width="644" colspan="2" rowspan="2" align="center" valign="top" bgcolor="#FFFFFF"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="450" height="130">
                <param name="movie" value="../alquilaauto/coco.swf" />
                <param name="quality" value="high" />
                <embed src="../alquilaauto/coco.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="450" height="130" ></embed>
              </object>            </td>
          </tr>
          <tr>
            <td height="17" align="center" bgcolor="#FFFFFF"><span class="Estilo43">El especialista en Rentadora de Autos. </span></td>
          </tr>
          <tr>
            <td height="11" colspan="3" align="left" bgcolor="#FFFFFF"><img src="../2012/linea2.png" alt="22" width="1000" height="11" /></td>
          </tr>
          <tr bgcolor="#FFFFFF">
            <td height="31" align="center" valign="bottom" class="Estilo40"><p>
                <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="308" height="31" title="alquiler de autos renta card">
                  <param name="movie" value="../2012/propuest2.swf" />
                  <param name="quality" value="high" />
                  <embed src="../2012/propuest2.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="308" height="31" ></embed>
                </object>
            </p></td>
            <td colspan="2" align="left" valign="middle" bgcolor="#FFFFFF"><table width="644" cellpadding="0" cellspacing="0">
                <tr>
                  <td width="96"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image9','','../2012/botones/nosotros1.png',1)"><img src="../2012/botones/nosotros.png" alt="4" name="Image9" width="94" height="25" border="0" id="Image9" /></a><a href="index.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image3','','../2012/botones/servicios1.png',1)"></a></td>
                  <td width="96"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image4','','../2012/botones/servicios1.png',1)"><img src="../2012/botones/servicios.png" alt="5" name="Image4" width="94" height="25" border="0" id="Image4" /></a></td>
                  <td width="145"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image5','','../2012/botones/modelos1.png',1)"><img src="../2012/botones/modelos.png" alt="3" name="Image5" width="142" height="25" border="0" id="Image5" /></a></td>
                  <td width="144"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image6','','../2012/botones/venta1.png',1)"><img src="../2012/botones/venta.png" alt="6" name="Image6" width="142" height="25" border="0" id="Image6" /></a></td>
                  <td width="87"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image7','','../2012/botones/faqs1.png',1)"><img src="../2012/botones/faqs.png" alt="2" name="Image7" width="85" height="25" border="0" id="Image7" /></a></td>
                  <td width="74" align="center"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image8','','../2012/botones/contacto1.png',1)"><img src="../2012/botones/contacto.png" alt="1" name="Image8" width="72" height="25" border="0" id="Image8" /></a></td>
                </tr>
            </table></td>
          </tr>
        </table></td>
        </tr>
      
    </table></td>
  </tr>
  <tr>
  <td height="3" colspan="5" align="center" bgcolor="#FF6600">    </tr>
  <tr>
    <td height="27" colspan="2" align="left" bgcolor="#FFFFFF"><img src="../imagenes/localiza.jpg" alt="6" width="55" height="36" /></td>
    <td height="27" align="left" bgcolor="#FFFFFF"><img src="../imagenes/avis.jpg" alt="2" width="87" height="35" /></td>
    <td height="27" align="left" bgcolor="#FFFFFF"><span class="Estilo1"><img src="../imagenes/herts.png" alt="3" width="92" height="32" /></span></td>
    <td height="27" align="left" bgcolor="#FFFFFF"><img src="../logos/alamo_rent_a_car_logo.gif" alt="alamo " width="100" height="32" /></td>
  </tr>
  <tr>
    <td height="27" colspan="2" align="left" bgcolor="#FFFFFF"><?php
    $conexion
=mysql_connect("localhost","user_admin","cla54d"
  or die(
"Problemas en la conexion");
mysql_select_db("josper_reservas",$conexion) or
  die(
"Problemas en la seleccion de la base de datos");
$obtenercodigo=mysql_query("SELECT MAX(codigo) as id FROM reserva");
$id=mysql_fetch_array($obtenercodigo); //$id["id"] = el ultimo id (mayor)
$resu mysql_query("select provincia, zona, coche, fechalq, horalq, fechdev, hordev, km, seguro, difd, difh from reserva where codigo = '" .$id['id'] ."'");
if (!
$resu) {
    echo 
'No se pudo ejecutar la consulta: ' mysql_error();
    exit;
}
$fila mysql_fetch_row($resu);
mysql_close($conexion);
$dias=$id["id"];
echo 
"Código de reserva: ".$id["id"]." <br>";
echo 
"Provincia: ".$fila[0]." <br>";
echo 
"Zona: ".$fila[1]." <br>";
echo 
"Tipo de auto: ".$fila[2]." <br>";
echo 
"Fecha de Alquiler: ".$fila[3]." <br>";
echo 
"Hora de Alquiler: ".$fila[4]." <br>";
echo 
"Fecha de Devolución: ".$fila[5]." <br>";
echo 
"Hora de Devolución: ".$fila[6]." <br>";
echo 
"Kilometraje Diario: ".$fila[7]." <br>";
echo 
"Seguro: ".$fila[8]." <br>";
 
$costo1="100"//Cargar aquí el importe diario de los coches pick-up 4 x 2 de la empresa Avis.
 
$costo2=($costo1 5)/100;
 
$costo3=($costo1-$costo2);
 
$costo4=$costo3*$dias;
  
?>

<br />
</td>
</table> 
</body>
</html>
Muchas gracias.