Ho provato ma forse nn ho catipo
Innanzitutto grazie per la gentile collaborazione,
credo di nn aver capito bene come fare, in quanto ho fatto varie prove spostando la sdtringa che mi hai dato, ma ho sempre questo risultato:
Microsoft VBScript compilation error '800a0401'
Expected end of statement
/login.asp, line 33
UPDATE logcounta SET contatore = contatore + 1 WHERE username = " & variabile_username & "
-----------------^
Ecco il codice
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="Connections/Dati_auto.asp" -->
<%
Dim Rpas
Dim Rpas_numRows
Set Rpas = Server.CreateObject("ADODB.Recordset")
Rpas.ActiveConnection = MM_Dati_auto_STRING
Rpas.Source = "SELECT * FROM pasword"
Rpas.CursorType = 0
Rpas.CursorLocation = 2
Rpas.LockType = 1
Rpas.Open()
Rpas_numRows = 0
%>
<%
' *** Validate request to log in to this site.
MM_LoginAction = Request.ServerVariables("URL")
If Request.QueryString<>"" Then MM_LoginAction = MM_LoginAction + "?" + Server.HTMLEncode(Request.QueryString)
MM_valUsername=CStr(Request.Form("user"))
If MM_valUsername <> "" Then
MM_fldUserAuthorization=""
MM_redirectLoginSuccess="illi/autoxx.asp"
MM_redirectLoginFailed="Login_fallito.asp"
MM_flag="ADODB.Recordset"
set MM_rsUser = Server.CreateObject(MM_flag)
MM_rsUser.ActiveConnection = MM_Dati_auto_STRING
MM_rsUser.Source = "SELECT user, password"
If MM_fldUserAuthorization <> "" Then MM_rsUser.Source = MM_rsUser.Source & "," & MM_fldUserAuthorization
MM_rsUser.Source = MM_rsUser.Source & " FROM pasword WHERE user='" & 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")
UPDATE logcounta SET contatore = contatore + 1 WHERE username = " & variabile_username & "
End If
MM_rsUser.Close
Response.Redirect(MM_redirectLoginSuccess)
End If
MM_rsUser.Close
Response.Redirect(MM_redirectLoginFailed)
End If
%>
<!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 NAME=author CONTENT="Gianluigi JD2008">
<META HTTP-EQUIV="expires" CONTENT="0">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<meta name="robots" content="index, follow" >
<META NAME =description CONTENT="Area riservata ">
<meta name="keywords" content="macchine usate, nuove">
<META NAME="language" contenent="it">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<META NAME="ROBOTS" CONTENT="INDEX,FOLLOW">
<title>Riservato ai commercianti</title>
<link rel="shortcut icon" href="http://www.piacenzacars.com/pip.ico" />
<style type="text/css">
<!--
.Stile12 {font-size: 14}
.Stile13 {color: #384c57; font-family: Arial, Helvetica, sans-serif; font-size: 14; }
.Stile2 {color: #CCCCCC}
.Stile3 { color: #cf4409;
font-family: Arial, Helvetica, sans-serif;
font-size: 20px;
}
.biglietto {
background-image: url(immagini/tab_login4.gif);
background-repeat: no-repeat;
}
-->
</style>
<link href="auto.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
body {
background-color: #333333;
}
a:link {
color: #577788;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #577788;
}
a:hover {
text-decoration: underline;
color: #CCCCCC;
}
a:active {
text-decoration: none;
color: #577788;
}
.Stile14 {
color: #C6240D;
font-family: Arial, Helvetica, sans-serif;
font-size: 36px;
}
.biglietto { background-image: url(immagini/tab_login4.gif);
background-repeat: no-repeat;
}
.biglietto1 { background-image: url(immagini/tab_login4.gif);
background-repeat: no-repeat;
}
.biglietto1 {background-image: url(immagini/tab_login4.gif);
background-repeat: no-repeat;
}
.Stile15 {color: #FFFFFF}
-->
</style>
<script type="text/JavaScript">
<!--
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers.document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_validateForm() { //v4.0
var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args);
if (val) { nm=val.name; if ((val=val.value)!="") {
if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
} else if (test!='R') { num = parseFloat(val);
if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
min=test.substring(8,p); max=test.substring(p+1);
if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
} } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
} if (errors) alert('The following error(s) occurred:\n'+errors);
document.MM_returnValue = (errors == '');
}
//-->
</script>
</head>
<body>
<div align="center">
<table width="900" height="182" border="0" class="up">
<tr>
<td valign="bottom"><div align="left">
<blockquote>
<p><span class="Stile2"><a href="index.asp">Home</a> :: <a href="chi.asp">Chi siamo</a> :: <a href="public/richieste.asp">Richieste</a> :: <a href="auto.asp">Le nostre auto</a> :: Login</span> </p>
</blockquote>
</div></td>
</tr>
</table>
<table width="900" height="553" border="0" class="sf">
<tr>
<td width="192" valign="top"><p> </p>
<table width="96%" border="0" align="center">
<tr>
<td><div align="left"><span class="Stile3">LE AUTOMOBILI</span> </div></td>
</tr>
<tr>
<td><div align="left"><span class="Stile12"></span></div></td>
</tr>
<tr>
<td><div align="left"><span class="Stile13"><a href="categorie.asp?tagauto=Berlina">Berlina</a></span></div></td>
</tr>
<tr>
<td><div align="left"><span class="Stile13"><a href="categorie.asp?tagauto=Coupe">Coupe</a></span></div></td>
</tr>
<tr>
<td><div align="left"><a href="categorie.asp?tagauto=StationWagon">Station Vagon</a></div></td>
</tr>
<tr>
<td><div align="left"><span class="Stile13"><a href="categorie.asp?tagauto=Suv">Suv</a></span></div></td>
</tr>
<tr>
<td><div align="left"><span class="Stile13"><a href="categorie.asp?tagauto=Furgoni">van</a></span></div></td>
</tr>
<tr>
<td><div align="left"><span class="Stile13"><a href="categorie.asp?tagauto=Jeep">Jeep</a></span></div></td>
</tr>
<tr>
<td><div align="left"><span class="Stile13"><a href="categorie.asp?tagauto=Sportive">Sportive</a></span></div></td>
</tr>
<tr>
<td><div align="left"><span class="Stile12"></span></div></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td><div align="center"><img src="immagini/eleganza.gif" alt="Banner" width="150" height="280" /></div></td>
</tr>
</table></td>
<td width="698" align="right" valign="middle"><table width="96%" height="532" border="0" align="right" class="sfovale">
<tr>
<td align="center" valign="top"><p class="Stile14"> </p>
<p class="Stile14">AREA RISERVATA<img src="immagini/stop.png" alt="Area riservata" width="99" height="103" align="right" /></p>
<table width="63%" height="218" border="0" align="center" onfocus="MM_validateForm('email','','RisEmail','psw','','R');return document.MM_returnValue">
<tr>
<td><form ACTION="<%=MM_LoginAction%>" method="POST" name="form_log" id="form_log" onsubmit="MM_validateForm('user','','RisEmail','password','','R');return document.MM_returnValue">
<table width="100%" height="205" border="0" align="left">
<tr>
<td width="94%" colspan="2"><div align="left"></div></td>
</tr>
<tr>
<td><div align="left"><span class="Stile15">
</span></div> <span class="Stile15"><label>
<div align="left">Email </div>
</label>
</span></td>
<td><div align="left">
<input name="user" type="text" id="user" size="30" maxlength="50" />
</div></td>
</tr>
<tr>
<td><div align="left"><span class="Stile15">
</span></div> <span class="Stile15"><label>
<div align="left">Password </div>
</label>
</span></td>
<td><div align="left">
<input name="password" type="password" id="password" size="5" maxlength="7" />
</div></td>
</tr>
<tr>
<td><div align="left">
<input name="Submit" type="submit" onclick="MM_validateForm('email','','RisEmail','psw','','R');return document.MM_returnValue" value="Invia" />
</div></td>
<td><div align="left">
<input type="reset" name="Submit2" value="Ripristina" />
</div></td>
</tr>
<tr>
<td colspan="2"><label></label>
<label></label></td>
</tr>
<tr>
<td colspan="2"><div align="left"></div></td>
</tr>
</table>
</form></td>
</tr>
</table>
<p> </p>
<p class="Stile15">Accesso riservato ai soli autorizati con pasword<br />
</p>
<p class="Stile15"><span class="Stile15">Il sistema controlla il numero</span> di accessi, gli utenti e l'indirizzo IP </p></td>
</tr>
</table></td>
</tr>
</table>
<table width="900" height="238" border="0" class="fotodwn">
<tr>
<td> </td>
</tr>
</table>
<table width="900" height="86" border="0" class="dwn">
<tr>
<td> </td>
</tr>
</table>
<p> </p>
<p> </p>
</div>
</body>
</html>
<%
Rpas.Close()
Set Rpas = Nothing
%>
__________________
Forse nn ho capito bene se puoi aiutarmi.
grazie