Ver Mensaje Individual
  #1 (permalink)  
Antiguo 05/04/2006, 11:27
jossxx
 
Fecha de Ingreso: marzo-2003
Mensajes: 225
Antigüedad: 21 años, 1 mes
Puntos: 0
recordar/recuperar contraseña

hola:

he creado un sistema de autentificación con DW y me estoy estrellando con lo de recordar/recuperar contraseñas. He probado insertando código de scripts en el de DW pero no va, cuestión de cookies, supongo, y de que no tengo idea de php.

¿Cómo puedo incluir esas opciones en el login?.
Gracias por adelantado

Esto es lo que tengo:

<?php require_once('../Connections/zona.php');
session_start();
$FF_LoginAction = $PHP_SELF;
if (isset($QUERY_STRING) && $QUERY_STRING!="") $FF_LoginAction .= "?".$QUERY_STRING;
if (isset($textfield)) {
$FF_valUsername=$textfield;
$FF_fldUserAuthorization="";
$FF_redirectLoginSuccess="../socios/soclis.php";
$FF_redirectLoginFailed="log2.php";
$FF_rsUser_Source="SELECT username, user_password ";
if ($FF_fldUserAuthorization != "") $FF_rsUser_Source .= "," . $FF_fldUserAuthorization;
$FF_rsUser_Source .= " FROM phpbb_users WHERE username='" . $FF_valUsername . "' AND user_password='" . md5($textfield2) . "'";
mysql_select_db($database_zona, $zona);
$FF_rsUser=mysql_query($FF_rsUser_Source, $zona) or die(mysql_error());
$row_FF_rsUser = mysql_fetch_assoc($FF_rsUser);
if(mysql_num_rows($FF_rsUser) > 0) {
// username and password match - this is a valid user
$MM_Username=$FF_valUsername;
session_register("MM_Username");
if ($FF_fldUserAuthorization != "") {
$MM_UserAuthorization=$row_FF_rsUser[$FF_fldUserAuthorization];
} else {
$MM_UserAuthorization="";
}
session_register("MM_UserAuthorization");
if (isset($accessdenied) && false) {
$FF_redirectLoginSuccess = $accessdenied;
}
mysql_free_result($FF_rsUser);
session_register("FF_login_failed");
$FF_login_failed = false;
header ("Location: $FF_redirectLoginSuccess");
exit;
}
mysql_free_result($FF_rsUser);
session_register("FF_login_failed");
$FF_login_failed = true;
header ("Location: $FF_redirectLoginFailed");
exit;
}
?><!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>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Documento sin t&iacute;tulo</title>
<style type="text/css">
<!--
.Estilo1 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 9;
}
.Estilo2 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 14px; color: #FF0000; }
.Estilo3 {color: #666666}
.Estilo4 {color: #333333}
.Estilo5 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 16px; }
.Estilo7 {font-size: 16}
.Estilo8 {
font-size: 14px;
color: #666666;
}
.Estilo9 {font-size: 12px}
.Estilo10 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 16px; color: #666666; }
.Estilo11 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; color: #666666; }
-->
</style>
</head>

<body>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<table width="250" border="0" align="center">
<tr>
<td width="244" class="Estilo2"><div align="center"><span class="Estilo7">semer.es<span class="Estilo3"> - <span class="Estilo4">acceso socios</span> </span></span></div></td>
</tr>
<tr>
<td class="Estilo5"><div align="center" class="Estilo8">
<div align="center">introduce tus claves </div>
</div></td>
</tr>
<tr>
<td class="Estilo5"><form action="<?php echo $FF_LoginAction?>" method="POST" name="form1" class="Estilo1" id="form1">
<pre><label><span class="Estilo3">usuario <input name="textfield" type="text" size="12" /> </span></label>
<span class="Estilo3"><label>contraseña</label></span><label> <input name="textfield2" type="password" size="12" /></label> <input type="submit" name="Submit" value="entrar" />

<label><input name="radiobutton" type="radio" value="radiobutton" />recordar contraseña</label>
recuperar contrase&ntilde;a
</pre>
</form></td>
</tr>
</table>
</body>
</html>

Última edición por jossxx; 05/04/2006 a las 11:42