Nothing to write a simple user login code, also posted it
<!--#include file= "inc/cn.asp"-->
<!--#include file= "inc/function.asp"-->
<%
MyName =html_encode (Request.Form ("myname"))
Mypass =html_encode (Request.Form ("Mypass"))
If myname= "" or mypass= "" Then
Response.Write ("<script>alert username password cannot be empty!") '); History.back ();</script> ")
Elseif Len (myanme) >15 or Len (mypass) >15 Then
Response.Write ("<script>alert (' username password length 1-15"); History.back ();</script> ")
Else
Sql= "SELECT * from Stu_user where user_id= '" &myname& "' and user_pwd= '" &mypass& ""
Call Db_connect ()
Set Rs=conn.execute (SQL)
If not rs.eof Then
Session ("Uid") =rs ("user_id")
Session ("Udj") =rs ("User_dj")
Session ("Stuname") =rs ("user_name")
Response.Redirect ("iframe.asp")
Else
Response.Write (' <script>alert username password is incorrect! '); History.back ();</script> ")
End If
End If
%>