No il sito è senza login, cmq ho provato così:
<%
If Request.Form("voto") = " " then
Response.Redirect "pagina_precedente.asp"
end if
%>
<%
art = Request.Form("id_articolo")
voto = Request.Form("voto")
ip = Request.ServerVariables("REMOTE_ADDR")
connessione = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("/mdb-database/database.mdb")
set conn = Server.CreateObject("ADODB.Connection")
conn.Open connessione
sql = "INSERT INTO voti_utente (id_articolo, voto, id_utente) VALUES ('"& art &"', '"& voto &"', '"& ip &"')"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, conn ,3,3
sql= "SELECT COUNT(*) AS VOTATO FROM voti_utente WHERE id_utente= ('"& ip &"') AND id_articolo=('"& art &"')"
Set rsa = Server.CreateObject("ADODB.Recordset")
rsa.Open sql
IF rsa("VOTATO")>0 THEN
Response.Redirect ("errore.asp")
else
Response.Redirect ("http://www.retrogaminghistory.com/articolo.asp?id="& art )
end if
%>
ma mi da errore, dove sbaglio?