Ciao manuel0081, un MEGA GRAZIE per qvermi risposto.
Allora, ti posto il codice delle pagine che fanno funzionare il tutto:
login.asp:
<%
Content = "" 'Clear the Content string
QStr = Request.QueryString("login")
if ucase(left(QStr,6))="CREATE" then
Title = "Registra"
else
Title = "Login"
end if
if QStr="passfailed" then
Content = Content & "<tr><td valign=top align=center><P>Password Errata!</P><A href=Javascript:history.go(-1)>Indietro</A></td></tr>"
elseif QStr="createpassfailed" then
Content = Content & "<tr><td valign=top align=center><P>Password Errata!</P><A href=Javascript:history.go(-1)>Indietro</A><BR><BR><A HREF=login.asp>Annulla registrazione</A></td></tr>"
elseif QStr="namefailed" then
Content = Content & "<tr><td valign=top align=center><P>Username non valido!</P><A HREF=login.asp?login=createnew>Click quì per creare il tuo account!</A><BR><BR><A HREF=Javascript:history.go(-1)>Indietro</A></td></tr>"
elseif QStr="createnamefailed" then
Content = Content & "<tr><td valign=top align=center><P>Username non valido!</P><A HREF=Javascript:history.go(-1)>Indietro</A><BR><BR><A HREF=login.asp>Annulla registrazione</A></td></tr>"
elseif QStr="creatednew" then
Content = Content & "<tr><td valign=top align=center><P>Il tuo account è stato creato con successo!</P><A HREF=login.asp>Login</A></td></tr>"
elseif QStr="createnew" then
Content = Content & "<form name=frmCreate method=POST action=create.asp>"
Content = Content & "<tr><td valign=top align=center><br>Username: <input type=text name=txtUsername></td></tr>"
Content = Content & "<tr><td valign=top align=center><br>Password: <input type=password name=txtPassword></td></tr>"
Content = Content & "<tr><td valign=top align=center><br>Nome: <input type=text name=txtFullname></td></tr>"
Content = Content & "<tr><td valign=top align=center><br>Cognome: <input type=text name=txtCognome></td></tr>"
Content = Content & "<tr><td valign=top align=center><br>E-Mail: <input type=text name=txtEmail></td></tr>"
Content = Content & "<tr><td valign=top align=center><br>Città: <input type=text name=txtCitta></td></tr>"
Content = Content & "<tr><td valign=top align=center><br>Nazione: <input type=text name=txtNazione></td></tr>"
Content = Content & "<tr><td valign=top align=center><br>Data nascita: <input type=text name=txtData></td></tr>"
Content = Content & "<tr><td valign=top align=center><br>Sesso: <input type=text name=txtSesso></td></tr>"
Content = Content & "<tr><td valign=top align=center><br><input type=submit name=cmdSubmit value=Registra></td></tr>"
Content = Content & "</form>"
else
Content = Content & "<form name=frmMain method=POST action=verify.asp>"
Content = Content & "<tr><td valign=top align=center><br>Username: <input type=text name=txtUsername></td></tr>"
Content = Content & "<tr><td valign=top align=center><br>Password: <input type=password name=txtPassword></td></tr>"
Content = Content & "<tr><td valign=top align=center><br><input type=submit name=cmdSubmit value=Login></td></tr>"
Content = Content & "</form>"
Content = Content & "<tr><td valign=top align=center><br><A HREF=login.asp?login=createnew>Click quì per creare il tuo account!</A></td></tr>"
end if
%>
<head>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<table cellpadding="0" cellspacing="0" align="center" border="0">
<tr>
<td><!--#include file="header.asp"--></td>
</tr>
<tr>
<td><img src="images/indeximages_02.jpg" alt="" border="0" /></td>
</tr>
<tr>
<td align="center">
<table border="0" cellspacing="0" cellpadding="0" align="center">
<%
Response.Write("<tr><td valign=top align=center><b>" & Title & "</b></td></tr>")
Response.Write(Content)%>
</table>
</td>
</tr>
<tr>
<td><img src="images/indeximages_16.jpg" alt="" border="0" /></td>
</tr>
<tr>
<td><!--#include file="footer.asp"--></td>
</tr>
</table>
</body>
pagina create.asp:
<%
Username = Request.Form("txtUsername")
Password = Request.Form("txtPassword")
Fullname = Request.Form("txtFullname")
Cognome = Request.Form("txtCognome")
Email = Request.Form("txtEmail")
Citta = Request.Form("txtCitta")
Nazione = Request.Form("txtNazione")
Data = Request.Form("txtData")
Sesso = Request.Form("txtSesso")
if Username = "" then Response.redirect("login.asp?login=createnamefailed")
if Password = "" then Response.Redirect("login.asp?login=createpassfailed")
set conn = server.CreateObject ("ADODB.Connection")
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & server.MapPath ("/mdb-database/users.mdb")
set rs = server.CreateObject ("ADODB.Recordset")
rs.Open "SELECT * FROM userlist", conn, 3, 3
do while not rs.EOF
if rs("username")=Username then
set rs=nothing
set conn=nothing
Response.Redirect("login.asp?login=createnamefailed")
end if
rs.MoveNext
loop
'Add a record
rs.AddNew
'Put username and password in record
rs("username")=Username
rs("password")=Password
rs("keywords")=Fullname
rs("cognome")=Cognome
rs("email")=Email
rs("citta")=Citta
rs("nazione")=Nazione
rs("datanascita")=Data
rs("sesso")=Sesso
'Save record
rs.Update
set rs=nothing
set conn=nothing
Response.Redirect("login.asp?login=creatednew")
%>
pagina verify.asp:
<%
Username = Request.Form("txtUsername")
Password = Request.Form("txtPassword")
set conn = server.CreateObject ("ADODB.Connection")
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & server.MapPath ("/mdb-database/users.mdb")
set rs = server.CreateObject ("ADODB.Recordset")
rs.Open "SELECT * FROM userlist where username='"& Username &"'", conn, 1
If rs.recordcount = 0 then
rs.close
conn.close
set rs=nothing
set conn=nothing
Response.Redirect("login.asp?login=namefailed")
end if
if rs("password") = Password then
Session("name") = rs("keywords")
Session("datanascita") = rs("datanascita")
Session("sesso") = rs("sesso")
Session("citta") = rs("citta")
Response.Redirect("default.asp")
else
rs.Close
conn.Close
set rs=nothing
set conn=nothing
Response.Redirect("login.asp?login=passfailed")
end if
%>
pagina default.asp
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script type="text/javascript" src="/rating/rating.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<table cellpadding="0" cellspacing="0" align="center" border="0">
<tr>
<td><!--#include file="header.asp"--></td>
</tr>
<tr>
<td>
<table cellpadding="0" cellspacing="0" align="center" border="0">
<tr>
<td><img src="images/genericpage_02.jpg" alt="" border="0" /></td>
<td>
<table cellpadding="0" cellspacing="0" align="center" border="0" class="nomeutentepagina" width="100%">
<tr>
<td valign="bottom" align="center">
<%
'Check if user is logged in
if Session("name") = "" then
'If not, go to login page
Response.Redirect("login.asp")
else
'If, build page
Response.write(Session("name"))
end if
%>
</td>
</tr>
</table>
</td>
<td><img src="images/genericpage_04.jpg" alt="" border="0" /></td>
<td>
<table cellpadding="0" cellspacing="0" align="center" border="0">
<tr>
<td><img src="images/genericpage_05.jpg" alt="" border="0" /></td>
</tr>
<tr>
<td>
<table cellpadding="0" cellspacing="0" align="center" border="0">
<tr>
<td><img src="images/genericpage_06.png" alt="" border="0" /></td>
<td><a href="default.asp" target="_self"><img src="images/genericpage_07.jpg" alt="" border="0" /></a></td>
<td><img src="images/genericpage_08.jpg" alt="" border="0" /></td>
<td><img src="images/genericpage_09.jpg" alt="" border="0" /></td>
<td><a href="editprofile.asp" target="_self"><img src="images/genericpage_10.jpg" alt="" border="0" /></a></td>
<td><img src="images/genericpage_11.jpg" alt="" border="0" /></td>
<td><img src="images/genericpage_12.jpg" alt="" border="0" /></td>
<td><a href="logout.asp"><img src="images/genericpage_13.jpg" alt="" border="0" /></a></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table cellpadding="0" cellspacing="0" align="center" border="0">
<tr>
<td>
<table cellpadding="0" cellspacing="0" align="center" border="0">
<tr>
<td><img src="images/genericpage_14.jpg" alt="" border="0" /></td>
<td>
<table cellpadding="0" cellspacing="0" align="center" class="fotoutente" border="0">
<tr>
<td align="center">
<table border="0" align="center">
<tr>
<td>
<%
Set Conn=Server.CreateObject("ADODB.Connection")
Conn.Open "PROVIDER=MSDASQL;" & _
"DRIVER={Microsoft Access Driver (*.mdb)}; " & _
"DBQ=" & server.mappath("/mdb-database/users.mdb")
Dim SQL
SQL = ""
SQL = SQL & "SELECT * FROM upload "
SQL = SQL & "WHERE username = '"
SQL = SQL & Session("name") & "'"
Set Rs = Conn.Execute(Sql)
If Rs.Eof OR Rs.Bof Then
Response.Write("<center><font color='red'>Non ci sono file caricati sul server.</font></center>")
Rs.Close
Set Rs = Nothing
Else
%>
<div align="center">
<table cellspacing="0" cellpadding="0" border="1">
<%
While Not Rs.Eof
%>
<tr>
<td><img width="160" height="120" src="/public/<%=Rs.Fields("nome_file")%>" alt="" border="0"></td>
<%
Rs.MoveNext
Wend
Rs.Close
Set Rs = Nothing
%>
</tr>
</table>
</div>
<% End If %>
<%
Conn.Close()
Set Conn = Nothing
%>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2"><img src="images/genericpage_21.jpg" alt="" border="0" /></td>
</tr>
<tr>
<td colspan="2"><img src="images/genericpage_22.jpg" alt="" border="0" /></td>
</tr>
<tr>
<td colspan="2">
<table cellpadding="0" cellspacing="0" align="center" border="0" class="listamici">
<tr>
<td> </td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2"><img src="images/genericpage_32.jpg" alt="" border="0" /></td>
</tr>
</table>
</td>
<td>
<table cellpadding="0" cellspacing="0" align="center" border="0" class="center">
<tr>
<td>
<div style="width:600px; height:800px; overflow-y:scroll; overflow-x: hidden" align="center">
<table width="450" cellpadding="0" cellspacing="0" align="center" border="0">
<tr>
<td> </td>
</tr>
<tr>
<td>
<table width="100%" cellspacing="0" cellpadding="0" align="center" border="1">
<tr>
<td> </td>
</tr>
<tr>
<td><!--#include virtual="/rating/rating.asp"-->
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td>
<table width="100%" cellspacing="0" cellpadding="0" align="center" border="1">
<tr>
<td> </td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> </td>
</tr>
</table>
</td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td>
<table width="100%" cellspacing="0" cellpadding="0" align="center" border="1">
<tr>
<td> </td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> </td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
<td>
<table cellpadding="0" cellspacing="0" align="center" border="0">
<tr>
<td>
<table cellpadding="0" cellspacing="0" align="center" border="0" class="ricerca">
<tr>
<td>
<form action="risultati.asp" target="_blank" method="POST"> Cerca utente:<br>
<input type="text" name="keywords">
<input type="submit" value="Cerca">
</form>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td><a href="mygallery.asp" target="_self"><img src="images/genericpage_18.jpg" alt="" border="0" /></a></td>
</tr>
<tr>
<td><a href="chatroom/default.asp" target="_blank"><img src="images/genericpage_19.jpg" alt="" border="0" /></a></td>
</tr>
<tr>
<td>
<table cellpadding="0" cellspacing="0" align="center" border="0" class="info">
<tr>
<td align="center">
<%
Response.Write(Session("datanascita"))
response.write("<br />")
Response.Write(Session("sesso"))
response.write("<br />")
Response.Write(Session("citta"))
response.write("<br />")
%>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td><img src="images/genericpage_24.jpg" alt="" border="0" /></td>
</tr>
<tr>
<td>
<img src="images/genericpage_25.jpg" alt="" border="0" /></td>
</tr>
<tr>
<td><img src="images/genericpage_26.jpg" alt="" border="0" /></td>
</tr>
<tr>
<td>
<img src="images/genericpage_27.jpg" alt="" border="0" /></td>
</tr>
<tr>
<td><img src="images/genericpage_28.jpg" alt="" border="0" /></td>
</tr>
<tr>
<td><a href="https://segreterie.unime.it/selfweb/" target="_blank"><img src="images/genericpage_29.jpg" alt="" border="0" /></a></td>
</tr>
<tr>
<td><img src="images/genericpage_30.jpg" alt="" border="0" /></td>
</tr>
<tr>
<td>
<table cellpadding="0" cellspacing="0" align="center" border="0" class="spaziobanner">
<tr>
<td>
<table cellpadding="0" cellspacing="0" align="center" border="0">
<tr>
<td align="center"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="200" height="120">
<param name="movie" value="Progettobanner1.swf">
<param name="quality" value="high">
<param name="wmode" value="opaque">
<embed src="Progettobanner1.swf" quality="high" wmode="opaque" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="200" height="120"></embed>
</object></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td><img src="images/genericpage_33.jpg" alt="" border="0" /></td>
</tr>
<tr>
<td><!--#include file="footer.asp"--></td>
</tr>
</table>
</body>
</html>