Ver Mensaje Individual
  #5 (permalink)  
Antiguo 03/06/2005, 15:23
Avatar de otreblanc
otreblanc
 
Fecha de Ingreso: mayo-2005
Ubicación: Chiapas, la última frontera...
Mensajes: 73
Antigüedad: 18 años, 11 meses
Puntos: 0
Hola!

INTRO.HTML------------------------
Código PHP:
<html><head><title>Introdusca su clave</title></head>
<
body>
  <
form action="script.php" method="post">
    
Clave:<input type=password name=pwd><br>
    <
input type=submit value=Enviar>
  </
form>
</
body></html
SCRIPT.PHP------------------------
Código PHP:
//implementando un --switch()-- se me hace mas claro el codigo:
<?php
  
switch () {
    case 
'clave1':
      
header("Location: index1.html");
      exit;
    case 
'clave2':
      
header("Location: index2.html");
      exit;
    case 
'clave3':
      
header("Location: index3.html");
      exit;
    default:
      
//password incorrecta: volver a pedirla
      
header("Location: intro.html");
      exit;
  }
?>
Enjoy! xD