mi consulta es como hacer con un checkbox que al usuario se le recuerde su nombre de usuario y contraseña para evitar loguearse a la siguente visita..esto es lo que hice.. pero no m funka
Código PHP:
<?php
if($_GET['tipo']=='crear'){
setcookie("ingresado",$check,time()+9600);?>
<script language="javascript">
window.location.href="home.php?modo=login";
</script>
<?php
}else{
?>
<!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>
<script language="javascript" type="text/javascript" src="js/js.js"></script>
<link href="css/style.css" type="text/css" rel="stylesheet" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Registrarse - Sistema</title>
</head>
<body bgcolor="#999999">
<form method="post" action="home.php?modo=login" onsubmit="return validaRegistro(this)">
<input type="hidden" name="tipo" value="crear"/>
<table cellpadding="0" cellspacing="0" border="0" class="tablaAdmin" width="760px" align="center">
<tr>
<td colspan="2"><img src="img/sebastian.jpg" /></td>
</tr>
<tr>
<td colspan="2" height="10" class="lineAdmin"></td>
</tr>
<tr>
<td height="60" colspan="2"></td>
</tr>
<tr>
<td colspan="2" class="tituloAdmin">PANEL LOGIN </td>
</tr>
<tr>
<td colspan="2">
<table width="90%" class="inputText" align="center">
<tr>
<td colspan="2" class="detallesAdmin">Detalles</td>
</tr>
<tr>
<td width="19%" class="fontAdmin">Usuario:</td>
<td width="81%"><input type="text" name="usuario" size="30" maxlength="30" class="inputAdmin" /></td>
</tr>
<tr>
<td width="19%" class="fontAdmin">Contraseña:</td>
<td width="81%"><input type="password" name="pass" size="30" maxlength="30" class="inputAdmin" /></td>
</tr>
<tr>
<td width="19%" class="fontAdmin"> </td>
<td width="81%"><input type="checkbox" name="check" /> <span class="fontAdmin">Recordar contraseña</span></td>
</tr>
<tr>
<td width="19%" class="fontAdmin"></td>
<td width="81%">
<input type="submit" value="Entrar" name="login" class="botonLogin" />
<input type="reset" value="Borrar" class="botonLogin" />
</td>
</tr>
<tr>
</tr>
</table>
</td>
</tr>
<tr>
<td height="100"></td>
</tr>
</table>
</form>
</body>
</html>
<?php
}
?>