Cursuri online pentru incepatori si profesionisti - CursuriOnline.ro :: Formular inscriere curs demonstrativCursuriOnline.ro :: Formular inscriere curs demo
<%
If Request.ServerVariables("REQUEST_METHOD") = "POST" Then
'check if the username exist
Set RSCheck = MyConn.Execute("Select * From Login Where UserName = '"& Request.Form("UserName") &"'")
If Not RSCheck.Eof then
Response.Write("User Name Exists!")
Response.Write("
")
Response.Write("Back to form!")
Response.End
End if
RSCheck.Close
set RSCheck = Nothing
'check if the password exist
Set RSCheck = MyConn.Execute("Select * From Login Where Password = '"& Request.Form("Password") &"'")
If Not RSCheck.Eof then
Response.Write("Password Exists!")
Response.Write("
")
Response.Write("Back to form!")
Response.End
End if
RSCheck.Close
set RSCheck = Nothing
Set RS = Server.CreateObject("ADODB.Recordset")
'---------------------------------------------------------
'Here I start to add the information into the Table [Login]
'---------------------------------------------------------
RS.open "Select * From Login Where 1 = 2;", MyConn, 1, 3
RS.AddNew
RS("UserName") = Request.Form("UserName")
RS("PassWord") = Request.Form("PassWord")
RS("Clearance") = "1"
RS("LessonViews") = "0"
RS("Curs") = "Demo"
RS("Studii") = Request.Form("Studii")
RS("Nume") = Request.Form("Nume")
RS("Email") = Request.Form("Email")
RS("Varsta") = Request.Form("Varsta")
RS("Ocupatia") = Request.Form("Ocupatia")
RS("Oras") = Request.Form("Oras")
RS("Logins") = "0"
RS("ExpireDate") = Date () +60
RS("SessionStart") = Now
RS.Update
strAutoID = RS("ID")
'---------------------------------------------------------
' Send Mail Copy to Admin
Dim objMail
Dim strBody
strBody = "Vă mulțumim pentru că v-ați înregistrat pentru a utiliza cursul demo pe site-ul www.CursuriOnline.ro. Mai jos aveți datele introduse."
strBody = strBody & "