problema:
sul sito
http://www.8lab.it/sondaggio.asp

c'è questa statistica che dovrebbe caricare random ad ogni clik dei dati e delle immagini presenti nel database....

solo che il pulsante sand mi dà un errore.In locale funziona bene,
Io non sono un programmatore, qualcuno può aiutarmi???




<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>

<%
set rs=server.CreateObject("adodb.recordset")
if request.Form("Submit")="" then

id_testo=request.QueryString("id_testo")
if id_testo<>"" then
strsql="Select Testo.testo, Percentuali.perc From Testo, Percentuali where Testo.id_testo=Percentuali.id_testo and Testo.id_testo=" & id_testo
rs.open strsql, conn,3,3
testo=rs("testo")
perc=rs("perc")
rs.close

'Seleziono l'ultimo ID inserito e controllo se trovo dati
strsql = "SELECT Max(id_img) as id FROM Immagini"
set rs = conn.Execute(strsql)
If Not rs.Eof Then
MaxId = rs("id")
Else
MaxId = 0
End If
Rs.Close : Set rs = Nothing
'Effettuo la funzione di random
Randomize
RandomNumber = Cint(Rnd * MaxId)
'Seleziono un img casuale
strsql = "SELECT TOP 1 * FROM Immagini WHERE id_img >= " & RandomNumber
set rs = conn.Execute(strsql)
If Not rs.Eof Then
immagine=rs("file_img")
Else
immagine="Nessun immagine da visualizzare"
End If

conn.close
set conn=nothing
end if



%>
<!DOCTYPE html PUBLIC "-//W3C//Dtd XHTML 1.0 Strict//EN"
"http://www.w3.org/tr/xhtml1/Dtd/xhtml1-strict.dtd">
<html lang="it" xml:lang="it" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>sondaggio</title>
<style type="text/css">@import url(sondaggio.css);</style>
</head>

<body>
<table width="12%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="17" background="immagini/sondaggio_01.gif" height="350"></td>

<td valign="bottom" width="736">
<table border="0" >
<tr>
<td width="70">
<%if id_testo="" then%>
[img]immagini/statistic_html_30.gif[/img]
<%else%>
[img]immagini/<%=immagine%>[/img]" />
<%end if%>
</td>
</tr>
<tr>
<td class="barra" height="<%=perc%>"></td>
</tr>
</table> </td>
</tr>
<tr>
<td background="immagini/sondaggio_03.gif" wight="17" height="30">[img]immagini/sondaggio_03.gif[/img]</td>


<td class="top" align="center"> <%=perc%>% </td>
</tr>
</table>












<table width="250" border="0">
<tr>
<td align="center">

sondaggio</p>


esprimi un desiderio max 30 caratteri</p></td>
</tr>
<tr>
<td align="center">
<form name="form1" id="form1" method="post" action="">
<input name="testo" type="text" id="testo" maxlength="30" />
<input name="Submit" type="submit" value="sand" />
</form>
</td>
</tr>
</table>
</body>
</html>
<%
else
'recupero il testo immesso
testo=request.Form("testo")
'Controllo quanti testi uguali ci sono
strsql="Select * From Testo where testo='" & testo & "'"
rs.open strsql, conn,3,3
if not rs.eof then
testoesistente="ok"
id_testo=rs("id_testo")
rs.close
else
testoesistente="ko"
rs.close
end if

'Nel caso il testo non è già presente lo inserisco e poi ne inserisco anche la percenuale ad 1%
if testoesistente="ko" then
' inserisco il testo nel database
strsql="Insert into Testo (testo) values ("
strsql= strsql & "'" & replace(testo, "'", "''") & "'"
strsql= strsql & ")"
conn.execute (strsql)

strsql="Select max(id_testo) as ultimo From Testo"
rs.open strsql,conn,3,3
id_testo=rs("ultimo")
rs.close

strsql="Insert into Percentuali (perc, id_testo) values ("
strsql= strsql & 1
strsql= strsql & ", " & id_testo
strsql= strsql & ")"
conn.execute (strsql)
end if


'Se il testo esiste recupero il valore in percentuale lo aumento di uno e lo aggiorno
if testoesistente="ok" then

strsql="Select * From Percentuali where id_testo=" & id_testo
rs.open strsql, conn,3,3
perc=rs("perc")
id_perc=rs("id_perc")
rs.close

newperc= perc+1


strsql = "Update Percentuali set"
strsql = strsql & " perc=" & newperc
strsql = strsql & ", id_testo=" & id_testo
strsql = strsql & " where id_perc=" & id_perc
conn.execute (strsql)
end if
conn.close
set conn=nothing

response.Redirect("sondaggio.asp?id_testo=" & id_testo)
end if
%>