Re: sesiones + xhtml 1.1 + validación
| From: | Ongapisa | Date: | Sun, 07 Mar 2004 12:38:06 +0000 |
| Subject: | Re: sesiones + xhtml 1.1 + validación | ||
| References: | 1 | Groups: | php.general.es |
| Request: | Send a blank email to general-es+get-46306@lists.php.net to get a copy of this message | ||
Pongo el código fuente, he intentado hacerle lo mas simple posible
para no liar la cosa.
<?
//Para register_globals=OFF
ini_set('register_globals',0);
//Para las sesiones
session_start();
session_name("ses");
ini_set('session.use_only_cookies',1);
ini_set("session.use_trans_sid","0");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/
TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xml:lang="es">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1
" />
<title>Prueba xhtml1.1 + sesions + validacion</title>
</head>
<body>
<?
if(!isset($_SESSION[usuario]) ) //no existe la session, es
decir, que no se ha logeado
{
echo "<p>Es un usuario anónimo puede ";
echo "<a href=\"cargar_pagina.php?name=usuarios&op
=usuario_nuevo\">registrarse</a> gratuitamente o ";
echo "<a href=\"cargar_pagina.php?name=usuarios&op
=entrar\">entrar</a> con su usuario</p>";
}
else
{
echo "<p>Hola: $_SESSION[usuario]! (<a href=\"cargar_
pagina.php?name=usuarios&op=salir\">salir</a>) ";
$permisos=$_SESSION['permisos'];
if ($permisos>=1)
{
echo "<a href=\"cargar_pagina.php?name=
usuarios&op=inscritos\">ver inscritos</a>";
}
echo "</p>";
}
echo "<hr />\n";
echo "<p>";
echo "<span class=\"pequeno\">";
echo "<a href=\"http://validator.w3.org/check/referer\"
title=
\"Valid XHTML 1.1!\">validar</a>";
echo "</span>";
echo "</p>";
?>
</body>
</html>
Y cuando lo doy a validar me sale:
# Note: The Validator XML support has some limitations.
# Line 10, column 93: cannot generate system identifier for general
entity "PHPSESSID"
# Line 10, column 102: reference not terminated by REFC delimiter
# Line 10, column 102: reference to external entity in attribute value
# Line 10, column 233: reference not terminated by REFC delimiter
# Line 10, column 233: reference to external entity in attribute value
La línea 10 sale en el código fuente:
<a href="cargar_pagina.php?name=usuarios&op=usuario_nuevo&
PHPSESSID=2bb.....be">
Muchas gracias.