ciao Fulvio58 ho cambiato come hai detto tu ma ho avuto lo stesso errore.
Vi invio tutto il codice:aiutooooooooo
codice:
<%
'Controlla se l'utente è loggato, in caso negativo lo rimanda a news_login.asp
If Session("Off_Logged") <> 1 Then
Response.Redirect("login.asp")
End If
If Session("Off_IsAdmin") <> 1 Then
%> <script type="text/javascript">
window.alert("Non hai il permesso per accedere a questa sezione.");
history.back(1)
</script><%
End If
Function CheckIsEmail(strEmailAddress)
Dim regEx, retVal
Set regEx = New RegExp
regEx.Pattern ="^(([^<>()[\]\\.,;:\s@""]+(\.[^<>()[\]\\.,;:\s@""]+)*)|("".+""))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.+[a-zA-Z]{2,}))$"
regEx.IgnoreCase = true
blnReturnValue = regEx.Test(strEmailAddress)
CheckIsEmail = blnReturnValue
End Function
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head >
<title>Bimbinvacanza.it - Offerte Speciali - Inserimento nuovo Utente</title>
<script type="text/javascript" src="tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
tinyMCE.init({
theme : "advanced",
mode : "exact",
elements: "Insert_news",
/*plugins : "fullpage",*/
theme_advanced_buttons3_add : "forecolor"
});
</script>
</head>
<style>
body
{
background-color:#d7e7ff;/*background-color:#93b4dd;*/
/*background-color: #3e84e1;*/
margin: 0px 20px 20px 0px;border:0px;
text-align:left;
font-family: sans-serif;
font-size:12px;
}
/*h1
{
font: italic 20px sans-serif;
font-style: oblique;
text-align: center;
color: ##00337a;
}*/
.logo
{
margin-left:120px;
width:374px;
height:132px;
background-image: url(img/offerte_man_celeste.gif);
background-repeat:no-repeat;
}
.a
{
border:solid 1px #000000;
margin-right:5px;
float:right;
}
.maskform
{
border:solid 1px #dd2200;
margin-left:20px;
width:500px;
height:auto;
padding:10px;
background-color:#ffAA44;;
/*background-color:#93b4dd;*/
color:White;
font-weight:bold;
}
button
{
background: none;
margin:0px;border:0px;
padding:0px;
}
.modificanews
{
background-image: url(images/modifica_news.jpg);
background-repeat: no-repeat;
margin-top:8px;
width:116px;
height:37px;
}
</style>
<body>
<div class="logo"></div></br>
<%
if Request.Form("user_user") = "" then
%>
<form id="form2" method="post" action="off_user_add.asp">
<span style="margin-left:20px;font-size:18px;color:#00337a;font-weight:bold">Inserisci nuovo utente</span>
<div class="maskform">
<table cellspacing="10px" >
<tr><td>Username:</td><td><input type="text" name="user_user" style="border: solid 1px #dd2200;font-family:Sans-Serif;width:200px" MaxLength="20"> </input></td></tr>
<tr><td>Email:</td><td><input type="text" name="user_email" style="border: solid 1px #dd2200;font-family:Sans-Serif;width:200px" MaxLength="100"> </input></td></tr>
<tr><td>Password:</td><td><input type="password" name="user_password" style="border: solid 1px #dd2200;font-family:Sans-Serif;width:200px" MaxLength="12"> </input></td></tr>
<tr><td colspan="2"></td></tr>
<tr><td>Nome della Struttura:</td><td><input type="text" name="user_nomestruttura" style="border: solid 1px #dd2200;font-family:Sans-Serif;width:200px" MaxLength="100"> </input></td></tr>
<tr><td>Regione:</td><td><input type="text" name="user_regione" style="border: solid 1px #dd2200;font-family:Sans-Serif;width:90px" MaxLength="25"> </input></td></tr>
<tr><td>Provincia:</td><td><input type="text" name="user_provincia" style="border: solid 1px #dd2200;font-family:Sans-Serif;width:20px" MaxLength="2"> </input></td></tr>
<tr><td>Link Sito Struttura:</td><td><input type="text" name="user_sitolink" style="border: solid 1px #dd2200;font-family:Sans-Serif;width:200px" MaxLength="100"> </input></td><td style="font-size:9px;color:red;">Senza il prefisso http://</td></tr>
<tr><td colspan="2"></td></tr>
<tr><td>Localita':</td><td><input type="text" name="user_localita" style="border: solid 1px #dd2200;font-family:Sans-Serif;width:200px" MaxLength="100"> </input></td></tr>
<tr><td>Indirizzo:</td><td><input type="text" name="user_indirizzo" style="border: solid 1px #dd2200;font-family:Sans-Serif;width:200px" MaxLength="100"> </input></td></tr>
<tr><td>Numero Telefonico:</td><td><input type="text" name="user_numtel" style="border: solid 1px #dd2200;font-family:Sans-Serif;width:150px" MaxLength="30"> </input></td></tr>
<tr><td colspan="2"></td></tr>
<tr><td>Vecchio ID:</td><td><input type="text" name="user_oldid" style="border: solid 1px #dd2200;font-family:Sans-Serif;width:90px" MaxLength="9"> </input></td></tr>
<tr>
<td align="right"><input type="submit" value="Inserisci" /> <input type="button" value="Annulla" onclick="window.close()" /> </td>
</tr>
</table>
</div>
</form>
<%Else
check = 1 'controllo per la validità degli input
if Request.Form("user_password") = "" then
%> <span style="margin-left:20px;font-size:18px;color:red;font-weight:bold">Errore, inserire una password.
Torna indietro.</span><%
check = 0
End If
'Valido l'email
if Request.Form("user_email") = "" then
%> <span style="margin-left:20px;font-size:18px;color:red;font-weight:bold">Errore, inserire un email valida.
Torna indietro.</span><%
check = 0
End If
if Request.Form("user_nomestruttura") = "" then
%> <span style="margin-left:20px;font-size:18px;color:red;font-weight:bold">Errore, inserire un nome per la struttura associata.
Torna indietro.</span><%
check = 0
End If
if Request.Form("user_regione") = "" then
%> <span style="margin-left:20px;font-size:18px;color:red;font-weight:bold">Errore, inserire una regione valida.
Torna indietro.</span><%
check = 0
End If
if Request.Form("user_provincia") = "" then
%> <span style="margin-left:20px;font-size:18px;color:red;font-weight:bold">Errore, inserire una provincia valida.
Torna indietro.</span><%
check = 0
End If
if check = 1 then
user = webtodb(Request.Form("user_user")) ' Salvo i valori filtrati
nome_struttura = webtodb(Request.Form("user_nomestruttura"))
regione = webtodb(Request.Form("user_regione"))
provincia = webtodb(Request.Form("user_provincia"))
localita = webtodb(Request.Form("user_localita"))
indirizzo = webtodb(Request.Form("user_indirizzo"))
numtel= webtodb(Request.Form("user_numtel"))
eemail = webtodb(Request.Form("user_email"))
password = md5(Request.Form("user_password"))
sitolink = webtodb(Request.Form("user_sitolink"))
oldid = webtodb(Request.Form("user_oldid"))
'connessione al DB
%><%
%><%
'Stringa SQLdi inserimento
SQL = "INSERT INTO [utenti](User, Passw, sitolink, old_id, regione, nome_struttura, provincia, localita, indirizzo, numero, email, isadm) VALUES ('"&user&"', '"&password&"', '"&sitolink&"', '"&oldid&"', '"®ione&"', '"&nome_struttura&"', '"&provincia&"', '"&localita&"' , '"&indirizzo&"', '"&numtel&"', '"&eemail&"', 0)"
Conn.Execute(SQL)
Conn.Close
%><span style="margin-left:20px;font-size:18px;color:green;font-weight:bold">Utente inserito.
Chiudi.</span><%
End If
End If
%>
</body>
</html>