Ver Mensaje Individual
  #11 (permalink)  
Antiguo 21/01/2014, 12:23
ani692
 
Fecha de Ingreso: enero-2014
Mensajes: 2
Antigüedad: 10 años, 3 meses
Puntos: 0
Respuesta: Problema Undefined index

Hola a todos
Soy nueva tambien el tema y tengo un problema que me causa dolor de cabeza...!!
tengo un formulario donde edito los datos de la base de datos para alguna modificacion y estos se envian a un segundo formulario donde hace validaciones con for e if y si son correctos los manda a un tercer formulario donde los guarda en la bd, el problema es cuando declaro una variable me marca Undefined index: y si la quito ya no me marca nada, pero no la puedo ignorar porque la necesito abajo dejo mi codigo.



<form action="validacion_principal_update.php" method="POST" name="edit_principal">
<div id="PageWrap">
<div id="Header"></div><!-- Header -->
<!-- <div id="MenuNav">-->
<div id="menu-wrapper">
<ul id="hmenu">
<?php
menu($_SESSION['tipo_cuenta']);
?>

</ul>

</div><!-- MenuNav -->
<div id="Content">
<center>
<table BORDER='0'>

<br>
<tr>
<td>
IP
</td>
<td>
<input type="text" name="ip1" size ="1" maxlength="3" onKeyUp="return ValNumero(this);" value ="<?php echo$row['ip1'];?>"/>
<input type="text" name="ip2" size ="1" maxlength="3" onKeyUp="return ValNumero(this);" value ="<?php echo$row['ip2'];?>"/>
<input type="text" name="ip3" size ="1" maxlength="3" onKeyUp="return ValNumero(this);" value ="<?php echo$row['ip3'];?>"/>
<input type="text" name="ip4" size ="1" maxlength="3" onKeyUp="return ValNumero(this);" value ="<?php echo$row['ip4'];?>"/>
</td>
</tr>
<tr>
<td>
Mascara de Red
</td>
<td>
<input type="text" name="m1" size ="1" maxlength="3" onKeyUp="return ValNumero(this);" value ="<?php echo$row['Mascara1'];?>"/>
<input type="text" name="m2" size ="1" maxlength="3" onKeyUp="return ValNumero(this);" value ="<?php echo$row['Mascara2'];?>"/>
<input type="text" name="m3" size ="1" maxlength="3" onKeyUp="return ValNumero(this);" value ="<?php echo$row['Mascara3'];?>"/>
<input type="text" name="m4" size ="1" maxlength="3" onKeyUp="return ValNumero(this);" value ="<?php echo$row['Mascara4'];?>"/>
</td>
</tr>
<tr>
<td>
Puerta de enlace
</td>
<td>
<input type="text" name="p1" size ="1" maxlength="3" onKeyUp="return ValNumero(this);" value ="<?php echo$row['Puerta_enlace1'];?>"/>
<input type="text" name="p2" size ="1" maxlength="3" onKeyUp="return ValNumero(this);" value ="<?php echo$row['Puerta_enlace2'];?>"/>
<input type="text" name="p3" size ="1" maxlength="3" onKeyUp="return ValNumero(this);" value ="<?php echo$row['Puerta_enlace3'];?>"/>
<input type="text" name="p4" size ="1" maxlength="3" onKeyUp="return ValNumero(this);" value ="<?php echo$row['Puerta_enlace4'];?>"/>
</td>
</tr>
<tr>
<td>
VLAN
</td>
<td>
<input type="text" name="VLAN" size ="1" maxlength="2" onKeyUp="return ValNumero(this);" value ="<?php echo$row['VLAN'];?>"/>
</td>
</tr>
<tr>
<td>
MAC
</td>
<td>
<input type="text" name="mac1" size ="1" maxlength="3" value ="<?php echo$row['MAC1'];?>"/>
<input type="text" name="mac2" size ="1" maxlength="3" value ="<?php echo$row['MAC2'];?>"/>
<input type="text" name="mac3" size ="1" maxlength="3" value ="<?php echo$row['MAC3'];?>"/>
<input type="text" name="mac4" size ="1" maxlength="3" value ="<?php echo$row['MAC4'];?>"/>
<input type="text" name="mac5" size ="1" maxlength="3" value ="<?php echo$row['MAC5'];?>"/>
<input type="text" name="mac6" size ="1" maxlength="3" value ="<?php echo$row['MAC6'];?>"/>
</td>
</tr>
<tr>
<td>
Descripcion de equipo
</td>
<td>
<input type="text" name="desc" value="<?php echo strtoupper($row["Descripcion_equipo"]); ?>">
</td>
</td>
</tr>
<tr>
<td>
Nombre de equipo
</td>
<td>
<input type="text" name="nom" value="<?php echo strtoupper($row["Nom_equipo"]); ?>">
</td>
</tr>
<tr>
<td>
Usuario
</td>
<td>
<input type="text" name="user" value="<?php echo strtoupper($row["Usuario"]); ?>">
</td>
</tr>
<tr>
<td>
Puerto
</td>
<td>
<input type="text" name="pto" size ="1" maxlength="3" onKeyUp="return ValNumero(this);" value ="<?php echo$row['Puerto'];?>"/>
</td>
</tr>
<tr>
<td>
Switch
</td>
<td>
<input type="text" name="sw" size ="1" maxlength="4" onKeyUp="return ValNumero(this);" value ="<?php echo$row['Switch'];?>"/>
</td>
</tr>

este es el primer formulario y la que me causa conflicto es el campo "VLAN"

despues se envia a este

session_start();
$_SESSION['id']=$_POST['id'];
$_SESSION['i1']=$_POST['ip1'];
$_SESSION['i2']=$_POST['ip2'];
$_SESSION['i3']=$_POST['ip3'];
$_SESSION['i4']=$_POST['ip4'];
$_SESSION['m1']=$_POST['m1'];
$_SESSION['m2']=$_POST['m2'];
$_SESSION['m3']=$_POST['m3'];
$_SESSION['m4']=$_POST['m4'];
$_SESSION['ci']=$_POST['VLAN'];

aqui el problema es que solo el campo VLAN me causa conflicto


ayudenme porfavor...!!!