Re: [PHP-ES] Problemas con session

[email protected] (Philipp Keweloh)
Newsgroups php.general.es
Message-ID <[email protected]>
El día 21 de noviembre de 2010 15:16, Irantzu Leunda Biskarret
<[email protected]> escribió:
> Estimados amigos, tengo un problemilla con unas variables de sesion.
> Estoy poniendo lo siguiente:
> en un archivo llamado index tengo un formulario donde debo introducir
> usuario y contraseña y lo paso a un archivo llamado privado.php que tiene lo
> siguiente:
>
> <?php
> if(!$iden or !$cont)
> {
> include("index.php");
> }
> else
> {
>
>  if($iden=="fertor" and $cont=="fertor10")
>  {
>  session_start();
>  $_SESSION[admin] = true;
>
>  include("panel.php");
>  }
>  else
>  {
>  include("index.php");
>  }
> }
> ?>
>
> El caso es que no me está pasando nada porque siempre se queda en el
> formulario. Lo pueden ver en http://dosalcubo.net/fertor/admin
>
> Como siempre muchísimas gracias por todo
>
>
> --
> PHP Spanish Localization Talk Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


RTFM: http://php.net/manual/es/language.variables.predefined.php

Utiliza $_POST o $_GET en vez de variables globales.


-- 
Philipp Keweloh
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.