Ver Mensaje Individual
  #13 (permalink)  
Antiguo 13/07/2011, 21:04
julg03
 
Fecha de Ingreso: julio-2011
Mensajes: 47
Antigüedad: 12 años, 9 meses
Puntos: 0
Respuesta: Autenticar usuario y direccionarlo a carpeta propia en hosting para descar

perdon se me olvido pegar el codigo...son dos archivos..uno...aqui estan:
autenticar.php
<?php
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
//$user = $_POST['user'];
$pass = $_POST['password'];

if ($pass == $pass[$pass]) {
$path = 'http://mirrors.ibiblio.org/pub/mirrors/rsync/'.$pass;
header('location: '.$path);
exit();
}else {
echo 'La cuenta no existe. Por favor comuniquese a nuestras oficinas';
}
}
?>

<form id="myform" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" onSubmit="return valida()">
<fieldset><legend>Ingrese su Cuenta y haga Click en el Botón "ACEPTAR"</legend>
<label for="password">Cuenta:</label>
<input type="text" id="password" name="password" maxlength="6" />
<input type="submit" name="submit" value="ACEPTAR" />
</fieldset>
</form>
-----------------------------------
usuarios.php
<?php
$users = array(
'user'=>'password',
'cuenta001'=>'1001',
'cuenta002'=>'1006'
//etc etc etc
);