# ASP : whats wrong with this code?

**URL:** <https://forum.kirupa.com/t/asp-whats-wrong-with-this-code/142856>\
**Category:** Uncategorized\
**Created:** [April 1, 2005, 3:21am UTC](https://forum.kirupa.com/t/asp-whats-wrong-with-this-code/142856 "2005-04-01T03:21:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![imported\_dinkumrocks](https://avatars.discourse-cdn.com/v4/letter/i/58f4c7/32.png) [@imported\_dinkumrocks](https://forum.kirupa.com/u/imported_dinkumrocks)\
**Post date:** [April 1, 2005, 3:21am UTC](https://forum.kirupa.com/t/asp-whats-wrong-with-this-code/142856/1 "2005-04-01T03:21:30Z")

</div>

OK. im making it so users can register.

this is the code…

```auto
 
Set RScheck = Server.CreateObject("ADODB.Recordset") 
strSQL = "SELECT * FROM members WHERE username=" & Request.form("username") & ""
RScheck.LockType = 3
RScheck.Open strSQL, Conn 
If RScheck.EOF then
Set RS = Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT * FROM members"
RS.LockType = 3
RS.Open strSQL, Conn
RS.AddNew
RS.Fields("fname") = Request.Form("fname")
RS.Fields("lname") = Request.Form("lname")
RS.Fields("email") = Request.Form("email")
RS.Fields("username") = Request.Form("username")
RS.Fields("password") = Request.Form("password")
RS.Fields("address") = Request.Form("address")
RS.Fields("city") = Request.Form("city")
RS.Fields("state") = Request.Form("state")
RS.Fields("country") = Request.Form("country")
RS.Fields("zipcode") = Request.Form("zipcode")
RS.Fields("phone") = Request.Form("phone")
RS.Fields("mobile") = Request.Form("mobile")
RS.Fields("gender") = Request.Form("gender")
RS.Fields("list") = Request.Form("list")
RS.Fields("allowhtml") = Request.Form("allowhtml")
RS.Update
 
'email script to make the users confirm they're account
 
else
Response.Redirect "activate.asp?mode=usernametaken"
 
end if
 
RS.Close
set RS = nothing
Conn.Close
set Conn = nothing 

```

thanks for any help  
-Naaman
