Ver Mensaje Individual
  #23 (permalink)  
Antiguo 05/10/2005, 14:52
sergiold
 
Fecha de Ingreso: octubre-2004
Mensajes: 751
Antigüedad: 19 años, 6 meses
Puntos: 4
Tienes razón no es ese el error, el error está en que no cierras el primer if().

Prueba con lo siguiente:
Código PHP:
<?php
///////////////////////////////////////////////////
/*               Get Firefox 3.0                 */
/*           Por Alexis Carrasco Muñoz           */
/* Este archivo deberá ser incluido en la página */
/*             Bajo licencia GPL                 */
/*        Prohibido el ánimo de lucro            */
///////////////////////////////////////////////////

/*Si el usuario usa Mozilla Firefox*/

if (eregi ("firefox"$_SERVER['HTTP_USER_AGENT'])) {

echo (
"<table width='40%'  border='0'>
  <tr>
    <td><div align='center'>Veo que utilizas<em> Mozilla Firefox</em></div></td>
  </tr>
  <tr>
    <td><div align='center'>¿Sab&iacute;as que puedes ponerle <a href='https://addons.mozilla.org/themes/?application=firefox'>skins</a> y <a href='https://addons.mozilla.org/extensions/?application=firefox'>extensiones</a>?</div></td>
  </tr>
  <tr>
    <td><div align='center'>
      <p>&iexcl;Nosotros tambien utilizamos <a href='http://www.mozilla-europe.org/es/products/firefox/'><strong>Mozilla Firefox</strong></a>!</p>
      </div></td>
  </tr>
  <tr>
    <td><div align='center'><a href='http://www.mozilla-europe.org/es/products/firefox/'><img src='http://sfx-images.mozilla.org/affiliates/Buttons/80x15/blue_1.gif' alt='' border='0'> </div></td>
  </tr>
</table>\n"
);

/*Si el usuario usa Microsoft Internet Explorer*/
}
if (
eregi ("MSIE"$_SERVER['HTTP_USER_AGENT'])) {

echo (
"<table width='40%'  border='0'>
  <tr>
    <td><div align='center'>Veo que utilizas<em> Microsoft Internet Explorer</em></div></td>
  </tr>
  <tr>
    <td><div align='center'>¿Sab&iacute;as de la inseguridad de este navegador?</div></td>
  </tr>
  <tr>
    <td><div align='center'>Nosotros utilizamos <a href='http://www.mozilla-europe.org/es/products/firefox/'><strong>Mozilla Firefox</strong></a> ¡Pru&eacute;balo!</div></td>
  </tr>
  <tr>
    <td><div align='center'><a href='http://www.mozilla-europe.org/es/products/firefox/'><img src='http://sfx-images.mozilla.org/affiliates/Buttons/80x15/blue_1.gif' alt='' border='0'> </div></td>
  </tr>
</table>\n"
);

/*Si el usuario usa un navegador distinto*/

} else {

echo (
"<table width='50%'  border='0'>
  <tr>
    <td>      <p align='center'>No sabemos que navegador usas<em></em></p></td>
  </tr>
  <tr>
    <td><div align='center'>Pero...</div></td>
  </tr>
  <tr>
    <td><div align='center'>
      <p>¿Tiene navegaci&oacute;n con pesta&ntilde;as?</p>
      </div></td>
  </tr>
  <tr>
    <td><div align='center'>&iquest;Es de c&oacute;digo abierto? </div></td>
  </tr>
  <tr>
    <td><div align='center'><a href='http://www.mozilla-europe.org/es/products/firefox/'><strong>Mozilla Firefox</strong></a> si tiene todo esto y m&aacute;s&iexcl;Pru&eacute;balo!</div></td>
  </tr>
  <tr>
    <td><div align='center'><a href='http://www.mozilla-europe.org/es/products/firefox/'><img src='http://sfx-images.mozilla.org/affiliates/Buttons/80x15/blue_1.gif' alt='' border='0'></a></div></td>
  </tr>
</table>\n" 
);

}

;
?>
Saludos,

PD. Esta vez lo he probado y ahora si que me ha funcionado.

Edito.

Añado una cosa más. Como te he dicho antes yo usaria un elseif. ¿Por qué? Porque con tu código si usas Mozilla Firefox te sale el mensajito conforme usas FF y el mensajito conforme no usas IE.

Saludos,
__________________
sergiold