sé que existen array de vectores, pero no sé si se puede aplicar lo mismo en variables de sesión
he aquí un ejemplo
Código PHP:
<?
session_start();
$virtualnum = 0;
$_SESSION["virtualnum"] = 0;
if ($_SESSION["pagina"] != "Location: afiliacion1_2.php")
{
header("Location: afiliacion1_1.php");
}
if( isset( $_POST['Enviar'] ) )
{
$virtualnum = trim( $_POST['virtualnum'] );
if ( !empty( $virtualnum ) )
{
$virtualnum = $_POST['virtualnum'];
$_SESSION["virtualnum"] = $virtualnum;
$_SESSION["pagina"] = "Location: afiliacion2.php";
header("Location: afiliacion2.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ó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ón:</strong></p>
<p><strong>Solucitud de Números Virtuales.</strong></p>
<p class="Estilo7">Los números que solicite en esta sección serán verificados por nuestro sistema. En caso de estar disponible, se le notificará 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">
<tr>
<td width="337" align="right"><span class="Estilo9">Número virtual de 7 números:</span></td>
<td width="337"><label>
<input name="virtualnum" type="text" id="virtualnum" 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">© 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áctenos</a></span></strong></div></td>
</tr>
</table>
</body>
</html>