หน้า 2 ครับ
<%
user=Request.Form("UserID")
pass=Request.Form("Password")
%>
<%
if user <> "" and Password <> "" then
Set Conn=Server.CreateObject("ADODB.Connection")
Conn.Provider="SQLOLEDB;Server=DETMAGNET;Database=QC-AMG-QUANLITY;UID=AMG-QUANLITY-RW;PWD=amgquanlity"
Set rs=Server.CreateObject("ADODB.Recordset")
sql = "SELECT * FROM CT_TbUser WHERE user= ' " & IDNo&" ' and pass = ' " &Password&" ' "
rs.Open sql,1,3
%>
<%
if rs.RecordCount <> 0 Then Session ("username") = rs("IDNo")
if Session("username") <> " " then
%>
<Form name="form_1" method="post" action="">
<p> </p>
<p><strong><font color="#0000FF" size="5" face="Georgia, Times New Roman, Times, serif">Welcome</font><font color="#0000FF" size="5">