Go Back   CodingForums.com > :: Server side development > ASP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 03-18-2010, 04:43 AM   PM User | #1
vinumat
New to the CF scene

 
Join Date: Mar 2010
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
vinumat is an unknown quantity at this point
log in code not working :(

I tried running the below code using IExplorer.
Even after entering the username as 'joe' and password as 'please' it is not redirecting me to 'order.asp' instead says incorrect log in details..why??

Can you help me please
Thanks in advance!


<!-- 8-qu 3 order with form.asp -->

<!-- build output in a buffer then send -->
<% Response.Buffer = true %>


<%
IF Request.form="" THEN
%>


<html>
<head>
<title>Our private pages</title></head>

<body>
In order to access these pages fill the form below:
<BR>

<form method="post" action="8-qu 3 order with form.asp">
Username: <input type="text" name="username" size="20"><BR>
Password: <input type="password" name="password" size="15"><BR>
<input type="Submit" value="Submit">
</form>

</body>
</html>

<%
ELSE

IF Request.form("username")="Joe" AND Request.form("password")="please" THEN

Session("permission")="YES"
Session("username")="Joe"

' Redirect response to a different page
Response.Redirect("order.asp")

ELSE
%>

Error in username or password
<%
END IF ' login authentication
END IF ' form = ""
%>
vinumat is offline   Reply With Quote
Old 03-18-2010, 07:28 AM   PM User | #2
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,555
Thanks: 62
Thanked 4,054 Times in 4,023 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
Worked fine for me.

I'm beginnig to suspect that you do *NOT* have ASP running on your web server.

Try this test page, just to find out:
Code:
<html><body>
If ASP is active you will see the time and date here: <%=Now()%>
</body></html>
If you don't see the date and time, then ASP is not working on your server.
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Old Pedant is offline   Reply With Quote
Reply

Bookmarks

Tags
buffer, form, login, loginform, username

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:17 AM.


Advertisement
Log in to turn off these ads.