Troky16 de Diciembre del 2003
PreguntaBuenas a todos. Soy nuevo en php y tengo un problema con las sesiones. El caso es que no me sale nada en las variables de las sesiones, es como si no estubieran inicializadas. Aqui os pongo un ejemplo de las paginas que tengo haber si me podeis ayudar.
-------------------------------index.php----------------------------------
<?php
session_start();
?>
<html>
<head>
<title>Documento sin título</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?php
$_SESSION[a]="Hola";
?>
<a href="aceso.php">enlace</a>
</body>
</html>
-------------------------------aceso.php-----------------------------------
<?php
session_start();
?>
<html>
<head>
<title>Documento sin título</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#0000FF">
<?php
echo "La variable tiene: $_SESSION[a]";
?>
</body>
</html>
--------------------------------------------------------------------------------
Haber si me podeis ayudar porque yo no consigo sacar nada. Un saludo
-------------------------------index.php----------------------------------
<?php
session_start();
?>
<html>
<head>
<title>Documento sin título</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?php
$_SESSION[a]="Hola";
?>
<a href="aceso.php">enlace</a>
</body>
</html>
-------------------------------aceso.php-----------------------------------
<?php
session_start();
?>
<html>
<head>
<title>Documento sin título</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#0000FF">
<?php
echo "La variable tiene: $_SESSION[a]";
?>
</body>
</html>
--------------------------------------------------------------------------------
Haber si me podeis ayudar porque yo no consigo sacar nada. Un saludo
