Ver Mensaje Individual
  #5 (permalink)  
Antiguo 28/01/2010, 12:14
DaronWolff
 
Fecha de Ingreso: octubre-2009
Ubicación: Merida Yucatan
Mensajes: 93
Antigüedad: 14 años, 6 meses
Puntos: 2
Respuesta: Pedir nombre de usuario y contraseña utilizando un tipo de alert

Ups.
Pues desconosco que era el error.
Pero ya quedo :S
El Código de "maycolalvarez" quedo excelente
GRacias!!!
Puedo resumir el docto .php quedo de la siguiente forma:
<?php
if (!isset($_SERVER['PHP_AUTH_USER'])) {
header('WWW-Authenticate: Basic realm="My Realm"');
header('HTTP/1.0 401 Unauthorized');
echo 'Text to send if user hits Cancel button';
exit;
} else {
echo "<p>Hello {$_SERVER['PHP_AUTH_USER']}.</p>";
echo "<p>You entered {$_SERVER['PHP_AUTH_PW']} as your password.</p>";
}
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Documento sin t&iacute;tulo</title>
</head>

<body>
</body>
</html>