mi sapete dire dove cavolo sbaglio?grazie!!!
<%
frmUser = request("frmUser")
frmUser = replace(frmUser,"'","''")
frmPwd = request("frmPwd")
frmPwd = replace(frmPwd,"'","''")
frmNom = request("frmNom")
frmNom = replace(frmNom,"'","''")
if frmUser <> "" and frmPwd <> "" then
if request("act")= "SALVA" then
Set rst = Server.CreateObject("ADODB.Recordset")
Set Conn = Server.CreateObject("ADODB.Connection")
Set Cmd = Server.CreateObject("ADODB.Command")
Conn.CommandTimeout = 40
Conn.ConnectionTimeout = 40
Conn.CursorLocation = 3
%><%
Conn.Open
Cmd.ActiveConnection = Conn
Cmd.CommandType = 1
Cmd.CommandText = "select * from utenti where username = '"&frmUser&"' and pwd = '"&frmPwd&"'"
rst.Open Cmd,,1,1
Cmd.Execute
if rst.EOF then
Cmd.CommandText = "insert into utenti (username, pwd, nominativo) values ('"&frmUser&"','"&frmPwd&"','"&frmNom&"')"
Cmd.Execute
rst.Close
Set rst = Nothing
else
response.Write("<center><font face='verdana' color='red' size='4'>Utente già inserito</font>
<font face='verdana' size='2'>indietro</font></center>")
end if
Conn.Close
Set Conn = Nothing
response.end
response.redirect ("gestione_utenti.asp")
end if
end if
%>
<html>
<head>
<title>Crea nuovo utente</title>
</head>
<link href="/Stazione/inc/stile.css" rel="stylesheet" type="text/css">
<body>
<center>
<form action="crea_utente.asp" method="post">
<table width="300" border="0" cellspacing="0" cellpadding="1" bgcolor="#a85400">
<tr><td>
<table width="300" border="0" cellspacing="0" cellpadding="5" bgcolor="#ffd3a8">
<tr>
<td align="right" valign="middle"><span class="nero">User:</span> </td>
<td align="left" valign="middle"><input type="text" size="10" name="frmUser"></td>
</tr>
<tr>
<td align="right" valign="middle"><span class="nero">Password:</span> </td>
<td align="left" valign="middle"><input type="password" size="10" name="frmPwd"></td>
</tr>
<tr>
<td align="right" valign="middle"><span class="nero">Nominativo:</span> </td>
<td align="left" valign="middle"><input type="text" size="10" name="frmNom"></td>
</tr>
<tr bgcolor="#ff9933">
<td align="left">
<input type="submit" name="act" value="SALVA">
</td>
<td align="right">
<input type="button" value="CHIUDI" onclick="window.open('gestione_utenti.asp','_self' )">
</td>
</tr>
</table>
</td></tr>
</table>
</center>
</form>
</body>
</html>