<HTML><HEAD></HEAD>
<BODY dir=ltr>
<DIV dir=ltr>
<DIV style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt">
<DIV>Hola Leo,</DIV>
<DIV> </DIV>
<DIV>Estoy con el tema del login y las variables sesión me esta generando unos
problemitas...</DIV>
<DIV> </DIV>
<DIV>Tengo este código</DIV>
<DIV> </DIV>
<DIV><STRONG><?php</STRONG></DIV>
<DIV> <STRONG>if</STRONG> (
<STRONG>isset</STRONG>(<STRONG>$_POST</STRONG>['aceptar']))</DIV>
<DIV> {</DIV>
<DIV> <STRONG>if</STRONG> (
<STRONG>$_POST</STRONG>['usuario'] == "" )</DIV>
<DIV> {</DIV>
<DIV> //ya
esta validado con ajax e informado</DIV>
<DIV> }<STRONG>else</STRONG></DIV>
<DIV> {</DIV>
<DIV>
<STRONG>if </STRONG>( <STRONG>$_POST</STRONG>['pass'] == "" )</DIV>
<DIV> {</DIV>
<DIV>
//ya esta validado con ajax e informado</DIV>
<DIV>
}<STRONG>else</STRONG></DIV>
<DIV> {</DIV>
<DIV>
//Todo correcto, verificar usuario</DIV>
<DIV>
<STRONG>session_start</STRONG>();</DIV>
<DIV>
<STRONG>if</STRONG>(!<STRONG>isset</STRONG>(<STRONG>$_session</STRONG>['uss']))</DIV>
<DIV>
{</DIV>
<DIV>
<STRONG>$_session</STRONG>['uss']=$_POST['usuario'];</DIV>
<DIV>
<STRONG>$_session</STRONG>['pass']=$_POST['pass'];</DIV>
<DIV>
<STRONG>header</STRONG>("location:web/verifica.php");</DIV>
<DIV>
}<STRONG>else</STRONG></DIV>
<DIV>
{</DIV>
<DIV>
<STRONG>header</STRONG>("location:web/verifica.php");</DIV>
<DIV>
}</DIV>
<DIV> }</DIV>
<DIV> }</DIV>
<DIV> }</DIV>
<DIV><STRONG>?></STRONG></DIV>
<DIV>Bueno el error hay es que la variable sesión no esta definida, por lo que
estuve probando solo me permite 1 variable por sesión (no entiendo porque), lo
estuve chequeando con un código simple :</DIV>
<DIV> </DIV>
<DIV><STRONG><?php</STRONG></DIV>
<DIV><STRONG> session_start</STRONG>();</DIV>
<DIV><STRONG> $_session</STRONG>['usuario']="Admin";</DIV>
<DIV> <STRONG>$_session</STRONG>['pass']="123456";</DIV>
<DIV><STRONG> print</STRONG>("Las Variables sesión son:
<br>");</DIV>
<DIV> <STRONG>print</STRONG>("Password: " +
<STRONG>$_session</STRONG>['pass'] + "<br>");</DIV>
<DIV><STRONG> print</STRONG>("Usuario: " +
<STRONG>$_session</STRONG>['usuario'] + "<br>");</DIV>
<DIV><STRONG>?></STRONG></DIV>
<DIV><STRONG></STRONG> </DIV>
<DIV>Acá la variable <STRONG>$_session</STRONG>['usuario'] ni la registra, pero
si <STRONG>$_session</STRONG>['pass'], lo que probé destruyendo las variables
pero me da el mismo resultado. Acá le estoy errando en algo muy tonto o
esta mal configurado el servidor.</DIV>
<DIV> </DIV>
<DIV>Este código es solo de prueba ya que con el login voy hacer que verifique
que estén la variables sesión y las compare en la base, si esta todo OK pasa a
la pagina principal, sino vuelve al login.</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>Otra consulta:</DIV>
<DIV> </DIV>
<DIV>Estuve mirado que cada ves que se ejecuta <STRONG>session_start</STRONG>(),
genera un id distinto que se comprueba con<STRONG> session_id() </STRONG>, mi
duda es, ¿como se que dicho id caduco si al ejecutar
<STRONG>session_start</STRONG>() vuelve a generar uno distinto (cerrando y
abriendo navegador)?</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>Bueno Gracias Leo, seguro que esto lo chequearon la clase pasada pero
lamentablemente no pude asistir.</DIV>
<DIV> </DIV>
<DIV>
Saludos.</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV></DIV></DIV></BODY></HTML>