... lo unico que uso es esto ..
index.php
Código PHP:
<html>
<body>
<FORM name="login" action="autenticate.php" method="POST">
<div align="center">
<table border="0" cellspacing="0" cellpadding="0">
<tr valign="top">
<td width="24" height="18" align="left"><img src="img/username_left.gif" width="24" height="18" style="vertical-align: baseline;" /></td>
<td width="60" align="left">
<input id="search" name="login" size="10" /></td>
<td width="35" align="left"><img src="img/search_right.gif" width="11" height="18" style="vertical-align: baseline;"></td>
</tr>
<tr valign="top">
<td><img src="img/password_left.gif" width="24" height="18" style="vertical-align: baseline;" /></td>
<td>
<input name="password" type="password" id="search" size="10" /></td>
<td><img src="img/search_right.gif" width="11" height="18" style="vertical-align: baseline;">
<input name="submit" type="image" src="img/bot_submit.gif" height="18" />
</td>
</tr>
</table>
</div>
</form>
</body>
</html>
autenticate.php
Código PHP:
<?php
//Archivo de conexion
require("connect.php");
$login = $_POST['login'];
$password = $_POST['password'];
$autenticacion = $sql->seleccionar("admin", "*", "login='".$login."' AND password ='".$password."'");
if($autenticacion)
{
include("contenedor.php");
}else{
?>
<script>
location="index.php";
alert ("ERROR: El Login o Password ingresados son incorrectos...");
</script>
<?php
}//Fin del if
?>
mmmmmmmm