Asp code to call home page on logout button,reset password of user

Asp code to call home page on logout button

Make script code this way Put this code in vb-script tag

 sub home()  
 document.frm.submit()  
 end sub  
 //to call function on click event this way  
 onclick="home()"  


Asp code to reset password of user

If you want to reset password or change password of particular user and you can login page then you can get hint or help to set this code in your form.

 set con=server.CreateObject ("ADODB.CONNECTION")  
 set rs=server.CreateObject ("ADODB.RECORDSET")  
 con.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=database Path"  
 Response.Clear ()  
 set rs = con.Execute ("select * from logtable where Username='" & Request.Form ("logid") & "' and pwd = '" & Request.Form ("oldpassword") & "'" )  
 if rs.RecordCount <=0 then  
  Response.Write "invalid password"  
 end if  
 if Request.Form("check1")="pwd" and Request.Form ("check2")<>"question" then  
 con.Execute ("Update logtable set pwd='" & Request.Form("newpassword") & "' where pwd='" & Request.Form("oldpassword") & "'")  
 Response.Redirect ("loginpage.asp")  
 elseif Request.Form("check2")="question" and Request.Form ("check1")<>"pwd" then  
 con.Execute ("Update logtable set Question='" & Request.Form("question") & "', Answer='" & Request.Form("Answer") & "' where pwd='" & Request.Form("oldpassword") & "'")  
 Response.Redirect ("loginpage.asp")  
 elseif Request.Form("check1")="pwd" and Request.Form ("check2")="question" then  
 con.Execute ("Update logtable set pwd='" & Request.Form("newpassword") & "', Question='" & Request.Form("question") & "', Answer='" & Request.Form("Answer") & "' where pwd='" & Request.Form("oldpassword") & "'")  
 Response.Redirect ("loginpage.asp")  
 end if