[PHP-ES] Re: sesiones + xhtml 1.1 + validación

From: Ongapisa ( ongapisa .en. hotpop.com)
Date: Sun Mar 07 2004 - 13:38:06 CET


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&amp;op
=usuario_nuevo\">registrarse</a> gratuitamente o ";
  echo "<a href=\"cargar_pagina.php?name=usuarios&amp;op
=entrar\">entrar</a> con su usuario</p>";
 }
 else
 {
  echo "<p>Hola: $_SESSION[usuario]! (<a href=\"cargar_
pagina.php?name=usuarios&amp;op=salir\">salir</a>)&nbsp;";
  $permisos=$_SESSION['permisos'];

  if ($permisos>=1)
  {
   echo "<a href=\"cargar_pagina.php?name=
usuarios&amp;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&amp;op=usuario_nuevo&
PHPSESSID=2bb.....be">

Muchas gracias.

-- 
PHP Spanish Localization Talk Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


This archive was generated by hypermail 2.1.7 : Fri May 14 2004 - 16:04:34 CEST