Ciao, ho tolto delle righe non importanti x spazio,non riesco a inviartela intera il sito è Mercatinoplus
Grazie




<p align="left">[img]immagini/ita.gif[/img]<font color="#2376E1" size="5" face="Batang">Italia

<table border="0">
<%
dim id_regione, id_provincia, id_comune

id_regione = request.querystring("id_regione")
id_provincia = request.querystring("id_provincia")
id_comune = request.querystring("id_comune")

if id_regione ="" then id_regione=request.form("id_regione")
if id_provincia="" then id_provincia=request.form("id_provincia")
if id_comune="" then id_comune=request.form("id_comune")


Dim Myconn, Rs2, sql2, regione, comune
Set MyConn=Server.CreateObject("ADODB.Connection")
MyConn.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.Mappath("/mdb-database/mercatino.mdb")

'regione=""
'comune=""

if id_regione<>"" then
SQL2 = "Select regione From regioni where id_regione="&id_regione&""
Set RS2 = MyConn.Execute(SQL2)

While Not RS2.EOF
regione=rs2("regione")
RS2.MoveNext
Wend
RS2.Close
Set RS2 = Nothing
end if

if id_provincia<>"" then
SQL2 = "Select provincia From province where id_provincia="&id_provincia&""
Set RS2 = MyConn.Execute(SQL2)

While Not RS2.EOF
provincia=rs2("provincia")
RS2.MoveNext
Wend
RS2.Close
Set RS2 = Nothing
end if

if id_comune<>"" then
SQL2 = "Select comune From comuni where id_comune="&id_comune&""
Set RS2 = MyConn.Execute(SQL2)

While Not RS2.EOF
comune=rs2("comune")
RS2.MoveNext
Wend
RS2.Close
Set RS2 = Nothing
end if
%>
<form method="post" action="?op=filtra"><tr>
<td>
<select name="id_regione" id="id_regione" onChange="cerca_province();">
<%if id_regione<>"" then%>
<option value="<%=id_regione%>"><%=regione%></option>
<%end if%>
<option value="0">Seleziona Regione</option>
<%

SQL2 = "Select * From regioni order by regione asc"
Set RS2 = MyConn.Execute(SQL2)

While Not RS2.EOF
%>
<option value="<%=rs2("id_regione")%>"><%=rs2("regione")%> </option>
<%
RS2.MoveNext
Wend
RS2.Close
Set RS2 = Nothing
MyConn.Close
Set MyConn = Nothing
%>
</select>
</td>
</tr>
<tr>
<td id="provincia"><select id="id_provincia" name="id_provincia">
<%if id_provincia<>"" then%>
<option value="<%=id_provincia%>" selected="selected"><%=provincia%></option>
<%else%>
<option value="0" selected="selected">Seleziona la Provincia</option>
<%end if%>
</select></td>
</tr>
<tr>
<td id="comuni"><select id="id_comune" name="id_comune">
<%if id_comune<>"" then%>
<option value="<%=id_comune%>" selected="selected"><%=comune%></option>
<%else%>
<option value="0" selected="selected">Seleziona il Comune</option>
<%end if%>
</select></td>
</tr>
<tr>
<td><input type="submit" value="Filtra annunci" /></td>
</tr></form>
<tr><td>




<p align="center"><a href="sitiamici.html">[img]immagini/st.gif[/img][/b]
<p aling="center">[img]immagini/bgames23.gif[/img]

</td></tr></table>
<p align="center">


<p align="center">


<td height="378" width="546" align="center" bordercolorlight="#FFFFFF" bgcolor="#FFFFFF" valign="top">

<table border="0" width="750" cellspacing="0" cellpadding="0" align="center">

<tr> <td width="100%" valign="top">
<p align="center">
</tr>


<p align="center"><a href="http://www.mercatinoplus.net/cv.html">[img]immagini/bannerlavoro.gif[/img]
<tr>
<td valign="top">

<marquee style="font-size: 14pt; font-family:Batang; color: #ffffff"bgcolor="#ABCDEF" scrollamount="3" direction="left">Consiglio di inserire nei vostri annunci la Regione_Città_Cap </marquee>
<hr size="1" color="#FF0000">
<div align="center"><table border="0" width=503>

<% cat = Request.QueryString("CatID")

sql = "select * from cat order by id"
set rs = Conn.Execute (sql)
IF rs.EOF then
Response.Write "<center><font color='#838383'>Non sono ancora state create Categorie !!!
</font>"
Else
End IF%>

<div align="center"><table border="0" width=503>
<%
if request.querystring("op")="" then
%>
<!--

Annunci</p>-->
<%
else
Set MyConn=Server.CreateObject("ADODB.Connection")
MyConn.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.Mappath("/mdb-database/mercatino.mdb")

if id_regione<>"" then


%><p style="text-align: center; font-size: 14pt;">Annunci in zona:
<%

SQL2 = "Select * From regioni where id_regione="&id_regione&""
Set RS2 = MyConn.Execute(SQL2)

While Not RS2.EOF
%>
<%=rs2("regione")%>
<%
RS2.MoveNext
Wend
RS2.Close
Set RS2 = Nothing
%>
<%
end if

if id_provincia<>"" then
%>
<%


SQL2 = "Select * From province where id_provincia="&id_provincia&""
Set RS2 = MyConn.Execute(SQL2)

While Not RS2.EOF
%>
&gt; <%=rs2("provincia")%>
<%
RS2.MoveNext
Wend
RS2.Close
Set RS2 = Nothing
%>

<%
end if

if id_comune<>"" then
%>
<%

SQL2 = "Select * From comuni where id_comune="&id_comune&""
Set RS2 = MyConn.Execute(SQL2)

While Not RS2.EOF
%>
&gt; <%=rs2("comune")%>
<%
RS2.MoveNext
Wend
RS2.Close
Set RS2 = Nothing
%>
<%
end if
%></p><%
end if
%>
<%
Do while NOT rs.EOF
ColNum = 1
Do while ColNum < 3
%>

<TD ALIGN=LEFT VALIGN=top WIDTH="254">[img]<%=rs([/img]"><font face="Batang" size="2"> &amp;categoria=<%=server.urlencode(rs("cat"))%><%i f request.querystring("op")="filtra" then%>&amp;op=filtra&amp;id_regione=<%=request.for m("id_regione")%>&amp;id_provincia=<%=request.form ("id_provincia")%>&amp;id_comune=<%=request.form(" id_comune")%><%end if%>"><%=rs("cat")%><font face="Arial" size="3"COLOR = "#FF0000">
<%
IDCategoria = rs("id")
if request.querystring("op")="" then
sqlcount = "SELECT count(Titolo) FROM annunci where IDsottocat='" & IDCategoria & "' and show=yes"
else
if request.querystring("op")="filtra" then

if id_regione<>"" then
sqlcount = "SELECT count(Titolo) FROM annunci where IDsottocat='" & IDCategoria & "' and show=yes and id_regione="&id_regione&""
end if
if id_provincia<>"" then
sqlcount = "SELECT count(Titolo) FROM annunci where IDsottocat='" & IDCategoria & "' and show=yes and id_provincia="&id_provincia&""
end if
if id_comune<>"" then
sqlcount = "SELECT count(Titolo) FROM annunci where IDsottocat='" & IDCategoria & "' and show=yes and id_comune="&id_comune&""
end if
else
sqlcount = "SELECT count(Titolo) FROM annunci where IDsottocat='" & IDCategoria & "' and show=yes"
end if
end if
'response.write sqlcount

Set RScounts = Conn.Execute(sqlcount)
rcounts = RScounts(0)
Response.Write ("( " & rcounts & " )")
Response.Write "
"
Response.Write "<center><font color='#838383'>"& rs("descrizionecat")& "
</font>"

%>
</font></font></TD>
<%
if NOT rs.EOF then
rs.MoveNext
end if
ColNum = ColNum + 1
if NOT rs.EOF then
%>

<TD ALIGN=LEFT VALIGN=top WIDTH="249"> [img]<%=rs([/img]"><font size="2" face="Batang">&amp;categoria=<%=server.urlencode(rs("cat"))%><%i f request.querystring("op")="filtra" then%>&amp;op=filtra&amp;id_regione=<%=request.for m("id_regione")%>&amp;id_provincia=<%=request.form ("id_provincia")%>&amp;id_comune=<%=request.form(" id_comune")%><%end if%>"><%=rs("cat")%><font face="Batang" size="3"COLOR = "#FF0000">



<% IDCategoria= rs("id")
if request.querystring("op")="" then
sqlcount = "SELECT count(Titolo) FROM annunci where IDsottocat='" & IDCategoria & "' and show=yes"
else
if request.querystring("op")="filtra" then

if id_regione<>"" then
sqlcount = "SELECT count(Titolo) FROM annunci where IDsottocat='" & IDCategoria & "' and show=yes and id_regione="&id_regione&""
end if
if id_provincia<>"" then
sqlcount = "SELECT count(Titolo) FROM annunci where IDsottocat='" & IDCategoria & "' and show=yes and id_provincia="&id_provincia&""
end if
if id_comune<>"" then
sqlcount = "SELECT count(Titolo) FROM annunci where IDsottocat='" & IDCategoria & "' and show=yes and id_comune="&id_comune&""
end if
else
sqlcount = "SELECT count(Titolo) FROM annunci where IDsottocat='" & IDCategoria & "' and show=yes"
end if
end if
'response.write sqlcount
Set RScounts = Conn.Execute(sqlcount)
rcounts = RScounts(0)
Response.Write ("( " & rcounts & " )")
Response.Write "
"
Response.Write "<center><font color='#838383'>"& rs("descrizionecat")& "
</font>"
RScounts.close
set RScounts = nothing%>
</font></font></TD>
<%
END IF
ColNum = ColNum + 1
Loop
%>
<tr>
<%
IF NOT rs.EOF then
rs.MoveNext
End IF
Loop
%>

</TABLE>
</div>