Ver Mensaje Individual
  #4 (permalink)  
Antiguo 03/02/2012, 14:36
Avatar de repara2
repara2
 
Fecha de Ingreso: septiembre-2010
Ubicación: München
Mensajes: 2.445
Antigüedad: 13 años, 7 meses
Puntos: 331
Respuesta: Seleccionar menu si se ingresa a la sección

Código PHP:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <style>
  5. .selected{
  6. background-color:#99FF00;
  7. }
  8. </style>
  9. <meta http-equiv="Content-Type" content="text/html; charset=windows-1252" />
  10. <title>Documento sin t&iacute;tulo</title>
  11. </head>
  12. <body>
  13. <ul>
  14.   <li <?php  if(isset($_GET['linkId']) && $_GET['linkId']==0) echo "class=\"selected\""; ?>><a href="<?php echo $_SERVER['PHP_SELF']?>?linkId=0" target="_self">Home</a></li>
  15.   <li <?php  if(isset($_GET['linkId']) && $_GET['linkId']==1) echo "class=\"selected\""; ?>><a href="<?php echo $_SERVER['PHP_SELF']?>?linkId=1" target="_self">Home</a></li>
  16.   <li <?php  if(isset($_GET['linkId']) && $_GET['linkId']==2) echo "class=\"selected\""; ?>><a href="<?php echo $_SERVER['PHP_SELF']?>?linkId=2" target="_self">Home</a></li>
  17. </ul>
  18. </body>
  19. </html>
__________________
Fere libenter homines, id quod volunt, credunt.