Carissimi: AiuTAteMi!!!!!!
con questo codice:
eseguo un login!codice:<% ' *** Validate request to log in to this site. MM_LoginAction = Request.ServerVariables("URL") If Request.QueryString<>"" Then MM_LoginAction = MM_LoginAction + "?" + Request.QueryString MM_valUsername=CStr(Request.Form("username")) If MM_valUsername <> "" Then MM_fldUserAuthorization="" MM_redirectLoginSuccess="registrazione/login_ok.asp" MM_redirectLoginFailed="registrazione/no_login.asp" MM_flag="ADODB.Recordset" set MM_rsUser = Server.CreateObject(MM_flag) MM_rsUser.ActiveConnection = MM_connRegistrazione_STRING MM_rsUser.Source = "SELECT username, password" If MM_fldUserAuthorization <> "" Then MM_rsUser.Source = MM_rsUser.Source & "," & MM_fldUserAuthorization MM_rsUser.Source = MM_rsUser.Source & " FROM utenti WHERE username='" & Replace(MM_valUsername,"'","''") &"' AND password='" & Replace(Request.Form("password"),"'","''") & "'" MM_rsUser.CursorType = 0 MM_rsUser.CursorLocation = 2 MM_rsUser.LockType = 3 MM_rsUser.Open If Not MM_rsUser.EOF Or Not MM_rsUser.BOF Then ' username and password match - this is a valid user Session("MM_Username") = MM_valUsername If (MM_fldUserAuthorization <> "") Then Session("MM_UserAuthorization") = CStr(MM_rsUser.Fields.Item(MM_fldUserAuthorization).Value) Else Session("MM_UserAuthorization") = "" End If if CStr(Request.QueryString("accessdenied")) <> "" And false Then MM_redirectLoginSuccess = Request.QueryString("accessdenied") End If MM_rsUser.Close Response.Redirect(MM_redirectLoginSuccess) End If MM_rsUser.Close Response.Redirect(MM_redirectLoginFailed) End If if Session("MM_Username")<> "" Then response.write "benvenuto "& Session("MM_Username")&""& vbNewLine & _ "<form method=""POST"" action=""logout2.asp"">"& vbNewLine & _ "<div align=""center""><font face=""Verdana"" size=""1"" color=""#FF794B""> "& vbNewLine & _ "<input name=""submit2"" type=""submit"" style=""color: #486C98; background-color: #ffffff; border-top : 1px solid; border-bottom : 1px solid; border-left : 1px solid; border-right : 1px solid; font-family : Verdana,tahoma,Arial; font-size : 10px;"" value=""Logout"" size=""20"">"& vbNewLine & _ " </font></div>"& vbNewLine & _ "</form>"& vbNewLine else response.write "<form name=""form1"" id=""form1"" method=""POST"" action="&MM_LoginAction&">"& vbNewLine & _ "<table border=""0"" align=""center"" cellpadding=""0"" cellspacing=""0"">"& vbNewLine & _ "<tr>"& vbNewLine & _ "<td height=""28"" colspan=""2""><font size=""1"" face=""verdana"">Username:</font> "& vbNewLine & _ "<input name=""username"" type=""text"" id=""username"" size=""20"" style=""color : #486C98; background : #FFFFFF; border-top : 1px solid; border-bottom : 1px solid; border-left : 1px solid; border-right : 1px solid; font-family : Verdana,tahoma,Arial; font-size : 10px; font-weight: bold;"" /> "& vbNewLine & _ "</td>"& vbNewLine & _ "</tr>"& vbNewLine & _ "<tr>"& vbNewLine & _ "<td height=""28"" colspan=""2""><font size=""1"" face=""verdana"">Password:</font>"& vbNewLine & _ " "& vbNewLine & _ "<input name=""password"" type=""password"" id=""password"" size=""20"" style=""color : #486C98; background : #FFFFFF; border-top : 1px solid; border-bottom : 1px solid; border-left : 1px solid; border-right : 1px solid; font-family : Verdana,tahoma,Arial; font-size : 10px; font-weight: bold;"" />"& vbNewLine & _ "</td>"& vbNewLine & _ "</tr>"& vbNewLine & _ "<tr> "& vbNewLine & _ "<td width=""110"" height=""28""></td>"& vbNewLine & _ "<td width=""240"" height=""28""><input name=""submit2"" type=""submit"" style=""color: #486C98; background-color: #ffffff; border-top : 1px solid; border-bottom : 1px solid; border-left : 1px solid; border-right : 1px solid; font-family : Verdana,tahoma,Arial; font-size : 10px;"" value=""Entra"" size=""20"">"& vbNewLine & _ "</td>"& vbNewLine & _ "</tr>"& vbNewLine & _ "</table>"& vbNewLine & _ "</form>"& vbNewLine & _ "Non sei registrato? Registrati <hr>"& vbNewLine & _ "Hai perso la pasword? Recupera password"& vbNewLine end if%>
Ora quello che vorrei è di inserire l'opzione "ricorda password" in maniera tale che l'utente una volta loggatosi possa, una volta tornato sul sito, evitare la procedura di login! ho provato in vari modi, ma essendo codice di dreamweaver, non riesco a venirne a capo! qualcuno di voi può darmi una mano!?!?

Rispondi quotando
