<% Option explicit Response.Buffer = true %> Journal of The Association of Physicians of India
Journal of The Association of Physicians of India
About Us | News | Credits | Contact Us
 

<% Dim rs,rs1 set rs = Server.CreateObject("AdoDb.Recordset") set rs1 = Server.CreateObject("AdoDb.Recordset") rs.Open "select * from Doctor_Master where User_Id='"& trim(Request.Form("txtUid")) &"'",con,adOpenKeyset,adLockReadOnly if rs.RecordCount = 0 then if trim(Request.Form("txtNumber")) <> "" then rs1.Open "select * from Doctor_Master where Api_Membership_Number='"& trim(Request.Form("txtNumber")) &"'",con,adOpenKeyset,adLockReadOnly if rs1.RecordCount = 0 then con.execute "insert into Doctor_Master (Doctor_Name,Email,City,Api_Membership_Number,Postal_Address,User_Id,Password,Flag) values ('"& trim(Replace(Request.Form("txtDoctorName"),"'","''")) &"','"& trim(Replace(Request.Form("txtEmail"),"'","''")) &"','"& trim(Replace(Request.Form("txtCity"),"'","''")) &"','"& trim(Replace(Request.Form("txtNumber"),"'","''")) &"','"& trim(Replace(Request.Form("txtPostal"),"'","''")) &"','"& trim(Replace(Request.Form("txtUid"),"'","''")) &"','"& trim(Replace(Request.Form("txtPass"),"'","''")) &"',0)" Response.Write ("Thank you Registering!
") Response.Write ("Your user account will be activated after the approval of administrator

") Response.Write ("your User Id is : " & Request.Form("txtUid") & "") send_mail else Response.Write ("API Membership Mumber already exists.! Please Go Back.") end if rs1.Close else con.execute "insert into Doctor_Master (Doctor_Name,Email,City,Api_Membership_Number,Postal_Address,User_Id,Password,Flag) values ('"& trim(Request.Form("txtDoctorName")) &"','"& trim(Replace(Request.Form("txtEmail"),"'","''")) &"','"& trim(Replace(Request.Form("txtCity"),"'","''")) &"','"& trim(Replace(Request.Form("txtNumber"),"'","''")) &"','"& trim(Replace(Request.Form("txtPostal"),"'","''")) &"','"& trim(Replace(Request.Form("txtUid"),"'","''")) &"','"& trim(Replace(Request.Form("txtPass"),"'","''")) &"',0)" Response.Write ("Thank you Registering!
") Response.Write ("Your user account will be activated after the approval of administrator

") Response.Write ("your User Id is : " & Request.Form("txtUid") & "") send_mail end if else Response.Write ("User Id already exists.! Please Go Back.") end if private sub send_mail() 'Dimension variables Dim objCDOMail 'Holds the CDONTS NewMail Object 'Create the e-mail server object Set objCDOMail = Server.CreateObject("CDONTS.NewMail") 'Who the e-mail is from objCDOMail.From = Request.Form("txtEmail") 'Who the e-mail is sent to 'objCDOMail.To = "webmaster@japi.org" objCDOMail.To = "webmaster@japi.org" 'Set the subject of the e-mail objCDOMail.Subject = "Registration Form of " & Request.Form("txtDoctorName") 'Set the e-mail body format (0=HTML 1=Text) objCDOMail.BodyFormat = 0 'Set the main body of the e-mail objCDOMail.Body = Request.Form("txtDoctorName") & " Has fill up the registration form, please Confirm to activate the Account." 'Importance of the e-mail (0=Low, 1=Normal,2=High) objCDOMail.Importance = 1 'Send the e-mail objCDOMail.Send 'Close the server object Set objCDOMail = Nothing end sub %>