Simple Login Script in Classic ASP:

User avatar
admin
Site Admin
Posts: 35
Joined: Sun Jul 03, 2016 2:17 pm
Location: India
Contact:

Simple Login Script in Classic ASP:

Postby admin » Sun Jul 03, 2016 5:02 pm

Login Page Code: dologin.asp

Code: Select all

<FORM ACTION="login.asp" METHOD="post">
<TABLE BORDER=0>

<TR>

<TD ALIGN="right">Login:</TD>

<TD><INPUT TYPE="text"NAME="login"></INPUT></TD>

</TR>

<TR>

<TD ALIGN="right">Password:</TD>

<TD><INPUT TYPE="password" NAME="password"></INPUT></TD>

</TR>

<TR>

<TD ALIGN="right"></TD>

<TD><INPUT TYPE="submit" VALUE="Login"></INPUT>

<INPUT TYPE="reset" VALUE="Reset"></INPUT>

</TD>

</TR>

</TABLE>

</FORM>


Post Submit Page Code: login.asp

Code: Select all

<%
If Request.Form("login") = "user1" AND Request.Form("password") = "user1" Then
Response.Write "Logged in Protected Area"
Else
Response.Write "Access Denied!"
'Response.End
End If
%>


Note: User and password are 'user1' and they are Case Sensitive.

Have a nice daY
Finest web hosting solution at the most affordable rates
Cheap Website Hosting
cheap VPS hosting india

Return to “Scripts / Code Snippets”

Who is online

Users browsing this forum: No registered users and 0 guests