Ver Mensaje Individual
  #3 (permalink)  
Antiguo 01/05/2012, 17:15
misdatosxd
 
Fecha de Ingreso: mayo-2012
Mensajes: 4
Antigüedad: 12 años
Puntos: 0
Respuesta: Problema con logeo automático por código

Es un trabajito mira:

index.php

Código:
<html>
<head>
</head>
<body>
<form action='index2.php' method='post'>
Username: <input type='text' name='abc'>
Password: <input type='password' name='def'>
<input type='submit' value='Login'>
</form>
</body>
</html>
index2.php

Código:
<?php
$user=$_POST['user'];
$pass=$_POST['pass'];

if (($user=="afg89") && ($pass=="php")) header("Location: acceso.php");
echo ':/ ';
?>
acceso.php

Código:
<?php
echo 'welcome: Alex Smith ';
?>

Me falta hacer el entrar.php automático ! pero no se que funciones usar para hacer el post y que cuando ponga http://localhost/entrar.php me aparezca "welcome: Alex Smith"