Ciao a tutti io ho questo codice
<%@ Language=VBScript %>
<%
if Request.ServerVariables("REQUEST_METHOD") = "POST" then
strFullName = Request.Form("txtFullName")
strName = Request.Form("txtName")
strPassword = Request.Form("txtPassword")
strAzienda = Request.Form("txtAzienda")
strPersona = Request.Form("txtPersona")
strIndirizzo = Request.Form("txtIndirizzo")
strCap = Request.Form("txtCap")
strProvincia = Request.Form("txtProvincia")
strCitta = Request.Form("txtCitta")
strtelefono = Request.Form("txttelefono")
stremail = Request.Form("txtemail")
strDate = Now()
blnValid = True
strValid = "
<font face=Arial color=RED>" & _
"Invalid entry...!!!</font></p>" & vbCrLf & _
"<ul><font face=Arial size=2>" & vbCrLf
if strFullName = "" then
blnValid = False
strValid = strValid & "[*]<font color=""Blue"">Please Re-Enter a Your Full Name!</font>
" & vbCrLf
end if
if strName = "" then
blnValid = False
strValid = strValid & "[*]<font color=""Blue"">Riprova! Rimetti Nome utente e Password</font>
" & vbCrLf
end if
if strPassword = "" then
blnValid = False
strValid = strValid & "[*]<font color=""Blue"">Ti prego rinserisci User e Password.(Password's field maximum 10 Number, Or Letters)</font>
" & vbCrLf
end if
if blnValid = True then
strDSNPath = "PROVIDER=MSDASQL;DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("database\Progettisti.mdb")
strSQL_Insert = "INSERT INTO CustRecords ( Full_Name, Cust_Name, Cust_Password, Entry_Date, Nome_Azienda, Persona, Indirizzo, Cap, Provincia, Citta, Telefono, E-mail)" & _
" VALUES ('" & strFullName & "','" & strName & "', '" & strPassword & "', '" & _
strDate & "','" & strAzienda & "','" & strIndirizzo & "','" & strIndirizzo & "', '" & strCap & "','" & strProvincia & "', '" & strCitta & " ," & strtelefono & "','" & stremail & "');"
Set Conn=Server.CreateObject("ADODB.Connection")
Conn.Open strDSNPath
On error resume next
Conn.Execute strSQL_Insert
Conn.Close
Set Conn = Nothing
if err.number <> 0 then
strValid = "<p align=center><font face=Arial size=4 color=red>" & _
"Mi dispiace ma la username e la password sono già stati utilizzate
" & _
"
Ti Prego prova a sceglierne nuove</br>" & _
"
<font color = blue>Grazie Tanto</font></br>
" & _
"</font></p>" & _
"<p align=center><font face=Arial color=#8000FF>" & _
"Please Contact Our <a href=mailto:tri_nguyen3@fcmail.com>E-mail!</a>" & _
"</font></p>" & _
"<p align=center><font face=Arial color=#8000FF>" & _
"</font></p>"
else
strValid = "<h2 align=center><u><font face=Arial color=Red>" & _
"Thank you!.... " & strFullName & "
" & _
"</font></u></h2>
" & _
"<h3 align=center><font face=Arial color=Red>La registrazione ha avuto successo</font></h3>
" & _
"<h3 align=center><font face=Arial color=Red><u>Ora sei un membro della comunity</font></u></h3>
" & _
"<p align=center><font face=Arial color=Gold>" & _
"</font></p>"
end if
else
strValid = strValid & "<table align=""center""border=3>"&_
"<tr> <td><form action=""First_Time.asp"" method=""POST"" name=""form1""> "&_
"<tr><td align=""Left""><font color=""Blue"">Your Full Name:</font><input name=""txtFullName""></tr></tr></td>
" & _
"<tr><td align=""Left""><font color=""Blue"">User Name:</font><input name=""txtName""></tr></tr></td>
" & _
"<tr><td align=""Left""><font color=""Blue"">User Password:</font><input type=""password"" name=""txtPassword""maxlength=""10""></tr></td>" & _
"<tr><td>
<input type=""Submit"" value=""Re-Try""></tr></td> "&_
"</table><hr width=""400"">"
end if
else
Response.Redirect("login.html")
end if
%>
<HTML>
<HEAD>
<title>Successfully</title>
</HEAD>
<body background=glacier.gif>
<table WIDTH="600" ALIGN="center" BORDER="0" CELLSPACING="3" CELLPADDING="3">
<tr>
<td>
<%
Response.Write strValid
%>
</td>
</tr>
</table>
<U><h1><font color = "blue">Click here to try again!</font></h1></U></p>
</BODY>
</HTML>
Mi spiegate perche continua a dirmi che nome utente e passsword sono gia registrati ?
Non capisco...
Eppure sono diversi
I valori vengfono presi da:
<html>
<head>
<title>First Time</title>
</head>
<body background="">
</p>
<h2 align="center"><font color="#8000FF"><u>Prima Registrazione </u></h2>
</font>
<table WIDTH="600" ALIGN="center" BORDER="0" CELLSPACING="3" CELLPADDING="3">
<tr>
<td><form action="First_Time.asp" method="POST" name="form1">
<table BGCOLOR="#FFFFFF" BORDERCOLOR="#ECE9D8" ALIGN="center" BORDER="2" CELLSPACING="0"
CELLPADDING="4">
<tr>
<td ALIGN="center"><table align="center" bgColor="#0099FF" border="1" cellPadding="3"
cellSpacing="3">
<tr>
<td colspan="2" align="center" bgcolor="#FF0000"><font face="Arial" size="2"
color="#ffffff">Immetti i tuoi Dati:</font> </td>
</tr>
<tr>
<td width="98" align="right"><font color="white" face="Arial" size="2"><u>Your Full Name:</u></font></td>
<td width="189"><input type="text" name="txtFullName" size="20"></td>
</tr>
<tr>
<td align="right"><font color="white" face="Arial" size="2"><u>User</u></font></td>
<td><input type="text" name="txtName" size="20"></td>
</tr>
<tr>
<td align="right"><font color="white" face="Arial" size="2"><u>Password:</u></font></td>
<td><input type="password" name="txtPassword" size="20" maxlength="10"></td>
</tr>
<tr>
<td align="right"><font color="white" face="Arial" size="2"><u>Nome Azienda</u></font></td>
<td><input type="text" name="txtAzienda" size="20" maxlength="10"></td>
</tr>
<tr>
<td align="right"><font color="white" face="Arial" size="2"><u>Persona</u></font></td>
<td><input type="text" name="txtPersona" size="20" maxlength="10"></td>
</tr>
<tr>
<td align="right"><font color="white" face="Arial" size="2"><u>Indirizzo</u></font></td>
<td><input type="text" name="txtIndirizzo" size="20" maxlength="10"></td>
</tr>
<tr>
<td align="right"><u><font color="white" size="2" face="Arial">Cap</font></u></td>
<td><input type="text" name="txtCap" size="10" maxlength="10"></td>
</tr>
<tr>
<td align="right"><u><font color="white" size="2" face="Arial">Provincia</font></u></td>
<td><input type="text" name="txtProvincia" size="10" maxlength="10"></td>
</tr>
<tr>
<td align="right"><u><font color="white" size="2" face="Arial">Citta</font></u></td>
<td><input type="text" name="txtCitta" size="20" maxlength="10"></td>
</tr>
<tr>
<td align="right"><u><font color="white" size="2" face="Arial">Telefono</font></u></td>
<td><input type="text" name="txttelefono" size="20" maxlength="10"></td>
</tr>
<tr>
<td align="right"><u><font color="white" size="2" face="Arial">E-mail</font></u></td>
<td><input type="textl" name="txtemail" size="20" maxlength="10"></td>
</tr>
<tr>
<td colspan="2" align="center">
</p>
<input name="submit" type="submit" value="login">
<input name="reset" type="reset" OnClick="windows.history.back" value="CANCEL">
</p></td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</td>
</tr>
</table>
<center>
<u>.</u>
</center>
<hr width="500">
</body>
</html>

Rispondi quotando
