io ho cercato di risolvere così...:
codice:<%@LANGUAGE = JScript%> <% var azione = new String(Request.QueryString("azione")); %> <html> <head> <title>Login</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head> <style type="text/css"> body { margin: 0px, 0px, 0px, 0px; } div, td, input, textarea { font-size: 10px; font-family: Times; } a { color: #0000FF; text-decoration: None; } a:hover { color: #FF0000; text-decoration: Underline; } </style> <body scroll="Yes" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> <% if (azione == "OK") { var username = new String(Request.Form("username")); var password = new String(Request.Form("password")); var email2 = email.replace(/'/g,"''"); var username2 = username.replace(/'/g,"''"); var password2 = password.replace(/'/g,"''"); Cn = new ActiveXObject("ADODB.Connection"); Cn.Open("driver={Microsoft Access Driver (*.mdb)};dbq=" + Server.MapPath("../../../../mdb-database/utenti.mdb")); var Sql = "SELECT * FROM tbl_authors WHERE name = '" + username2 + "' AND pass = '" + password2 + "' email = '" + email2 + "'"; var EseguiLogin = Cn.Execute(Sql); if (EseguiLogin.EOF) { Cn.Close(); Response.redirect("accesso_negato.asp"); Response.End; } else { Cn.Close(); Session("username") = username; Session("email") = email; with (Response) { Response.redirect("../"); } } } else { %> <div align="center"> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="500" height="60"> <param name="movie" value="../testata_forum.swf"> <param name="quality" value="high"> <embed src="../testata_forum.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="500" height="60"></embed></object> <font color="#999999" size="2"> </font></p> <font color="#999999" size="2"> Benvenuto nella FaqForum di CG Studio Questo servizio è realizzato come supporto tecnico per i clienti, e gli utenti registrati a CG Studio Per accedere al servizio ti verranno richiesti l'Username e la Password</font> </p> </p> </div> <form method="post" action="login.asp?azione=OK"> <div align="center"> <table width="286" height="98" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="106"><div align="right"><font color="#0000CC">Username</font> </div></td> <td width="180"><input name="username" type="text" size="30"></td> </tr> <tr> <td><div align="right"><font color="#0000CC">Password</font> </div></td> <td><input name="password" type="password" size="30"></td> </tr> <tr> <td height="39"></td> <td> <input name="submit" type="submit" value="Login"> <input type="reset" name="Submit" value="Cancella"> </td> </tr> </table> </div> </form> <% } %> <div align="center"> </p> <font size="2">Non ti ricordi la Password? <a href="../../../../recupera_password_forum.asp">Clicca qui</a> Se Non sei Registrato <a href="../../../../registrazione_forum.asp">Clicca qui</a></font></p> </div> </body> </html>
Ma mi da questo errore...:
e credo che sia generato dal fatto che non ritrova la variabile "email", da cosa può dipendere?Microsoft JScript runtime error '800a1391'
'email' is undefined
/prove/forum/forum/login/login.asp, line 23
Grazie per l'aiuto... ciao

Rispondi quotando
il campo puoi chiamarlo come vuoi....