Ho seguito una guida per creare una carrello in ASP, però mi dà un errore che non riesco a scovare...qualcuno mi aiuta?
Sono in questa pagina e cliccando su acquista mi manda a CAR.ASP che però nnon funziona perchè viene scritto IMPOSSIBILE VISUALIZZARE LA PAGINA
PROD.ASP
<%@ LANGUAGE = VBSCRIPT %>
<%
'recuperiamo l'id del prodotto e lo assegnamo ad una nuova variabile
id = request.querystring("id")
'apriamo connessione e recordset
Set connprod = Server.CreateObject("ADODB.Connection")
conn_prod = "PROVIDER = Microsoft.Jet.Oledb.4.0; Data Source ="&_
server.mappath("negozio.mdb")
connprod.open conn_prod
Set rsprod = server.createobject("adodb.recordset")
sqlprod = "SELECT * FROM prodotti WHERE prod_id = "&id&""
rsprod.open sqlprod, connprod
%>
<html><head><title>Esempio di sito E-Commerce</title></head>
<body topmargin="0" leftmargin="0" bgcolor="#FFFFFF">
<div align="center">
<center>
<table border="0" width="780" cellspacing="0" cellpadding="0" height="0">
<tr>
<td width="411" height="10">
<p align="center"><font face="Verdana" color="#FF0000">Corso on-line di ************ e Guidainlinea.com</font></td>
</center>
<td width="365" height="10"></td>
</tr>
</table>
<table border="0" width="780" cellspacing="0" cellpadding="0" height="0">
<center>
<tr>
<td width="776" height="9" colspan="2">
<p align="center"></td>
</tr>
<tr>
<td width="309" height="10">
<p align="center"><font size="2" face="verdana">Motore di ricerca</font></p>
</td>
<td width="467" rowspan="6" height="45" align="right" valign="TOP">
<p align="center">[img]img/<%=rsprod([/img].gif"></p>
<%=rsprod("prod_nome")%>
<%=rsprod("prod_descc")%>
costo: <%=rsprod("prod_prezzo")%> €
<form method=post action=car.asp>
<input type=hidden name=id value="<%=rsprod("prod_id")%>">
<input type=hidden name=nome value="<%=rsprod("prod_nome")%>">
<input type=hidden name=prezzo value="<%=rsprod("prod_prezzo")%>">
<p align=center><input type=submit value=Acquista></p>
</form>
</td>
</tr>
<tr>
<td width="309" height="9">
<form method=get action=ricerca.asp>
<p align="center">
<input type=text name=cerca>
<input type=submit value=Cerca>
</form>
</td>
</tr>
<tr>
<td width="309" height="19"></td>
</tr>
<tr>
<td width="309" height="1">
<p align="center"><font size="2" face="verdana">Categorie:</font></td>
</tr>
<tr>
<td width="309" height="0" valign="TOP">
</td>
</tr>
<tr>
<td width="309" height="0"></td>
</tr>
</table>
</center>
</div>
</body></html>
<%
'chiudiamo connessione e recordset liberando risorse
rsprod.close
Set rsprod = NOTHING
connprod.close
Set connprod = NOTHING
%>
CAR.ASP
<% Response.Buffer = TRUE %>
<%
'ricevi ed assegna un valore alle variabili
ID = Request("id")
username = TRIM(Request("username"))
password = TRIM(Request("password"))
reg = Request("reg")
'apri connessione
Set Con = Server.CreateObject( "ADODB.Connection" )
str_conn = "Provider =microsoft.jet.oledb.4.0; data source="&_
server.mappath("negozio.mdb")
Con.open str_conn
'se reg ha valore vuol dire che qualcuno si e’ registrato ed aggiungi i dati nel database
if reg <> "" then
newnome = Request("newnome")
newcognome = Request("newcognome")
newusername = Request("newusername")
newpassword = Request("newpassword")
newemail = Request("newemail")
newindirizzo = Request("newindirizzo")
newcitta = Request("newcitta")
newcap = Request("newcap")
newprov = Request("newprov")
sqlString = "SELECT utenti_username FROM utenti WHERE utenti_username =
'"&fixQuotes(theUsername)&"'"
set rs = Con.Execute( sqlString )
if rs.eof then
response.write "<font face=Verdana size=2>Non puoi utilizzare questo username perchè già in
uso!</font>"
else
response.write "non esiste"
end if
rs.Close
Set rs = Nothing
sqlString = "INSERT INTO utenti (utenti_nome, utenti_cognome, utenti_username,
utenti_password, utenti_email, utenti_ind, utenti_citta, utenti_cap, utenti_prov) VALUES
('"&fixQuotes(newnome)&"', '"&fixQuotes(newcognome)&"', '"&fixQuotes(newusername)&"',
'"&fixQuotes(newpassword)&"', '"&fixQuotes(newemail)&"', '"&fixQuotes(newindirizzo)&"',
'"&fixQuotes(newcitta)&"', "&newcap&", '"&fixQuotes(newprov)&"')"
Con.Execute sqlString
username = newusername
password = newpassword
' questa e’ una funzione che crea i cookies
addCookie "username", username
addCookie "password", password
end if
' altra funzione che verifica la password
userID = checkpassword( username, password, Con )
'in base alla funzione precedente verifica quale pagina includere
if userID > 0 then %>
<% else %>
<% end if %>