
15/02/2002, 22:35
|
| | Fecha de Ingreso: enero-2002 Ubicación: Perez Zeledon Costa Rica
Mensajes: 1.009
Antigüedad: 23 años, 4 meses Puntos: 11 | |
Re: Un formulario en vez de dos <%
sUserName = Request.Form("username")
sName = Request.Form("name")
..etc..
Response.Write("<FONT FACE=" & chr(34) & sFont & chr(34) & ">")
Sub CheckName
sSQl = ""
sSQL = sSQL & "SELECT COUNT(*) as Total FROM registration WHERE username = " & SQLStr(sUserName)
Set CountRS = GobjConnect.Execute(sSQL)
If CountRS.Fields("Total") > 0 Then
Response.Write("<CENTER>The User Name you chose," & chr(34) & "<B>" & sUserName & "</B>" & chr(34) & ", has already been taken.<BR>")
Response.Write("Please use the ""<B>BACK</B>"" button on your browser to try again.</CENTER>")
Else
Call InsertUser
End If
End Sub
Sub InsertUser
npSQL = ""
npSQL = npSQL & " INSERT INTO Registration (username, password, Validated, Name, Email, Address1, Address2, City, State, Zip) "
npSQL = npSQL & " VALUES (" & SQLStr(sUserName) & ", "
npSQL = npSQL & SQLStr(sPassword) & " , "
If bUsersAdd = False Then
npSQL = npSQL & " false , "
Else
npSQL = npSQL & " true , "
End If
npSQL = npSQL & SQLStr(sName) & ", "
…etc…
GobjConnect.Execute(npSQL)
Response.Write("<CENTER>Your registration has been completed successfully.<BR>")
End Sub
Sub SendPassEmail(sPass)
sBody = ""
sBody = sBody & "***** SAVE THIS EMAIL -- DO NOT LOSE YOUR PASSWORD! *****" & chr(10) & chr(13)
sBody = sBody & " Your user name is: " & sUserName & chr(10) & chr(13)
sBody = sBody & " Your password is : " & sPass & chr(10) & chr(13)
sBody = sBody & "Powered by gallerywebs.com
Set objCDO = Server.CreateObject("CDONTS.NewMail")
objCDO.To = sEmail
objCDO.From = sAuctionEmail
objCDO.Subject = "Your Auction Password!"
objCDO.Body = sBody
objCDO.Send
End Sub
%>
Y aqui el redirect. Espero te sirva. Ok. |