Ver Mensaje Individual
  #1 (permalink)  
Antiguo 18/09/2006, 09:41
Avatar de omegafunky
omegafunky
 
Fecha de Ingreso: diciembre-2003
Ubicación: Tabasco, Mexico
Mensajes: 3.534
Antigüedad: 20 años, 4 meses
Puntos: 33
Problemita con SESSION

Hola amigos, buen inicio de semana para todos, les traigo otro problemilla, estoy trabajando con autentificacion y ya me sale todo perfectamente nada mas k al momento de iniciar sesion me sale esto.

Warning: Unknown: Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off, respectively. in Unknown on line 0
sesion_inicia.php
Código PHP:
session_start();
include('conex.php');
//$email_usu = $_SESSION['email_usu'];
//echo $_SESSION[autentificado];
  if (!isset($_SESSION['autentificado']))
      { 
   ?>
  <link href="shop_style.css" rel="stylesheet" type="text/css" />
    <br><br><br><br><br>
    <form name="iniciarsesion" action="sesion_procesa.php" method="post">
  <table width="250" border="0" align="center" cellpadding="0" cellspacing="0" class="tabla_menu">
   <tr>
   <td height="26" colspan="4" background="images/bg_blue_1.jpg"><div align="center" class="txt_blanco">
    <div align="left">Iniciar Sesion </div>
   </div></td>
   </tr>
   <tr class="slim">
   <td colspan="4">&nbsp;</td>
   </tr>
   <tr>
   <td width="5"></td>
   <td width="30" class="Estilo4 Estilo1 txta"><div align="right"><span class="Estilo7">Correo:</span></div></td>
   <td colspan="2"><input name="correo"  value="[email protected]" type="text" class="caja" id="correo" size="32" /></td>
   </tr>
   
   <tr>
   <td width="5" height="5">&nbsp;</td>
   <td width="30" height="5" class="Estilo4 Estilo1 txta"><div align="right"><span class="Estilo7">Contrase&ntilde;a:</span></div></td>
   <td height="5" colspan="2"><input name="pass" value="1" type="text" class="caja" id="pass" size="32" /></td>
   </tr>
   <tr>
   <td height="5">&nbsp;</td>
   <td height="5" class="txta Estilo8">&nbsp;</td>
   <td height="5"><div align="right">
     <input type="submit" name="Submit" value="Entrar">
   </div></td>
   <td width="2">&nbsp;</td>
   </tr>
   <tr class="slim">
   <td height="5" colspan="4" class="txta"><div align="justify" class="txtregistro"><br />
     Sino eres usuario registrado de PC Shop, 
     Registrate Gratis y disfruta de los beneficios que nuestra empresa tiene para ti, 
     que esperas <a href="index.php?secc=registro">Registrate Ahora</a> <br />
     <br />
   </div></td>
   </tr>
  </table>
 </form>
   <?php 
   
} else {
         
$email_usu $_SESSION['email_usu'];   
  
//Sentencia SQL para buscar un usuario con esos datos 
  
$query "SELECT nombre_usu, apellidos_usu, email_usu FROM usuario WHERE email_usu='$email_usu'"
  
  
$result mysql_query($query,$conex) or die( mysql_error() );  
  
  while (
$row mysql_fetch_array($result)) {
   
$nombre_usu $row["nombre_usu"];
   
$apellidos_usu $row["apellidos_usu"];
   
$email_usu $row["email_usu"];
   
session_start(); 
   
session_register("nombre_usu"); 
   
$nombre_usu $nombre_usu
   
session_register("apellidos_usu"); 
   
$apellidos_usu $apellidos_usu
   
session_register("email_usu"); 
   
$email_usu $email_usu
    }
    echo 
"Bienvenido $nombre_usu $apellidos_usu.";
       }
    
 
mysql_close($conex);
sesion_procesa.php
Código PHP:
<?php 
  
include('conex.php'); 
  
//if (isset($_POST['submit'])) {
  
$correo $_POST['correo'];
  
$pass $_POST['pass'];
  
$query "SELECT nombre_usu, apellidos_usu, email_usu FROM usuario WHERE email_usu='$correo' and pass_usu='$pass'"
  
$result mysql_query($query,$conex) or die( mysql_error() );  
  
  if (
mysql_num_rows($result)!=0){ 
  
//usuario y contraseña válidos 
  //defino una sesion y guardo datos 
  
session_start(); 
  
session_register("autentificado"); 
  
$autentificado "SI"
  
session_register("email_usu"); 
  
$email_usu $correo
  
?> <meta http-equiv="refresh" content="0;URL=index.php?secc=sesion_iniciar"/> <?php
  
//header ("Location: index.php?secc=sesion_iniciar"); 
 
}else { 
  
//si no existe le mando otra vez a la portada 
  
?> <meta http-equiv="refresh" content="0;URL=index.php?secc=hola"/> <?php
  
}  
?>