Ver Mensaje Individual
  #3 (permalink)  
Antiguo 28/08/2007, 13:47
The Neurochild
 
Fecha de Ingreso: marzo-2007
Mensajes: 53
Antigüedad: 17 años, 1 mes
Puntos: 0
Re: Problemas con campos de texto

He hecho todo lo posible para que funcionara, incluso las declare como array en los input, pero me sale un error: no se puede ir a la página de destino despues de cumplidos todos los requisitos.

Te envio de nuevo el código de la página, revísalo detenidamente. así me puedes decir en donde está el error.

Código PHP:
<?
session_start
();
for ( 
$i 1$i <= $_SESSION["numeros"]; $i++ ) {
$vpn[$i] = "";
$_SESSION["vpn"][$i] = "";
}
$lleno 0;
if (
$_SESSION["pagina"] != "Location: afiliacion1_2.php")
{
header("Location: afiliacion1_1.php");
}
if( isset( 
$_POST['Enviar'] ) ) 
{
   for ( 
$i 1$i <= $_SESSION["numeros"]; $i++ ) {
   
$vpn[$i] = trim$_POST['vpn['.$i.']'] );
   }
   for ( 
$i 1$i <= $_SESSION["numeros"]; $i++ ) {
   if ( !empty( 
$vpn[$i] ) )
   {
   
$vpn[$i] = $_POST['vpn['.$i.']'];
   
$_SESSION["vpn"][$i] = $vpn[$i];
   
$lleno++;
   }
   }
   if ( 
$lleno == $_SESSION["numeros"] ){
      
$_SESSION["pagina"] = "Location: afiliacion2.php";
   
header("Location: afiliacion2.php");
   }
   else{
      
$_SESSION["pagina"] = "Location: camposvacios.php";
   
header("Location: camposvacios.php");
   }
 
}
?>
<!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" />
<title>Equiphone :: Afiliaci&oacute;n</title>
<style type="text/css">
<!--
body,td,th {
 color: #000000;
 font-family: Geneva, Arial, Helvetica, sans-serif;
}
body {
 background-color: #FFFFFF;
}
a:link {
 color: #000000;
}
a:visited {
 color: #000000;
}
a:hover {
 color: #000000;
}
a:active {
 color: #000000;
}
.Estilo7 {font-size: 12px}
.Estilo9 {font-size: 12px; font-weight: bold; }
.Estilo10 {
 font-size: 12px;
 color: #FF3333;
 font-weight: bold;
}
.Estilo11 {font-size: 12px; color: #FFFFFF; }
.Estilo21 {color: #FF0000}
.Estilo27 {
 font-size: 14;
 font-weight: bold;
 color: #339900;
}
.Estilo28 {color: #FF0033}
-->
</style>
</head>
<body>
<table width="720" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td colspan="2"><img src="images/EquiPhone.jpg" width="303" height="108" /></td>
  </tr>
  <tr>
    <td colspan="2" align="center"><img src="images/header2.jpg" width="720" height="321" /></td>
  </tr>
  <tr>
    <td colspan="2"><p><strong>Afiliaci&oacute;n:</strong></p>
      <p><strong>Solicitud de N&uacute;meros Virtuales.</strong></p>
      <p class="Estilo7">Los n&uacute;meros que solicite en esta secci&oacute;n ser&aacute;n verificados por nuestro sistema. En caso de estar disponible, se le notificar&aacute; via e-mail.</p>
      <form id="factura" name="factura" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
        <table border="1" align="center" cellpadding="10" cellspacing="0" bordercolor="#000000">
          <? for ( $i 1$i <= $_SESSION["numeros"]; $i++ ) { ?>
          <tr>
            <td width="337" align="right"><span class="Estilo9">N&uacute;mero virtual <? echo $i?>:</span></td>
            <td width="337"><label>
              <input name="vpn[<? echo $i?>]" type="text" id="vpn[<? echo $i?>]" value="<? echo $vpn[$i]; ?>" size="7" maxlength="7" />
            </label></td>
          </tr>
          <? ?>
          <tr>
            <td colspan="2" align="right" valign="top" bordercolor="#000000"><input name="Enviar" type="submit" id="Enviar" value="Siguiente" /></td>
          </tr>
        </table>
      </form>
    </td>
  </tr>
  <tr>
    <td width="200" height="75" bgcolor="#FF0000"><table border="0" align="center" cellpadding="10" cellspacing="0">
      <tr>
        <td><p class="Estilo11">&copy; 2007 Equiphone.<br />
          Todos los derechos reservados. </p></td>
      </tr>
    </table></td>
    <td width="520" bgcolor="#CCCCCC"><div align="center"><strong><span class="Estilo7"><a href="index.php">Home</a> | <a href="productos.php">Productos</a> | <a href="servicios.php">Servicios</a> | <a href="cuenta.php">Su Cuenta</a> | <a href="soporte.php">Soporte</a> | <a href="contactos.php">Cont&aacute;ctenos</a></span></strong></div></td>
  </tr>
</table>
</body>
</html>

Última edición por The Neurochild; 28/08/2007 a las 14:13