PDA

View Full Version : ASP: Please help I need it by tonight



Abush
April 1st, 2004, 18:30
God it's been a long time since I did this so I forgot how to do it right
This is the asp code I did. There are two pages enter.html and login.asp for Enter.html this is the code
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<form name="form1" method="post" action="login.asp">
<table width="75%" border="1">
<tr>
<td width="15%"><div align="right">User Name:</div></td>
<td width="85%"><input name="name" type="text" id="name"></td>
</tr>
<tr>
<td><div align="right">Password:</div></td>
<td><input name="pass" type="password" id="pass" value=""></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><input type="submit" name="Submit" value="Login">
<input type="reset" name="Submit2" value="Reset"></td>
</tr>
</table>
</form>
</body>
</html>



and for login.asp I have the following code

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<% Dim name, pass
name = Request.form("name")
pass = Request.form("pass")
%>


<%
If name="name" And pass="password"
Then Response.write("thank you for loging in")
Else Response.Redirect(enter.html)
End If
%>

</body>
</html>


I keep on geting a message that says that I cant use the method post in the folder I wanted. I put 777 for the permission but noting at all so help me please Ironicaly I am trying to help a friend and I ended up needing help :) and yes I did it in dreamweaver

kabatak
April 1st, 2004, 22:54
try this in login.asp


<%
Dim name, pass
name = Request.form("name")
pass = Request.form("pass")

If name="name" AND pass="pass" Then
Response.write("thank you for loging in")
Else
Response.Redirect("enter.html")
End If
%>

Abush
April 1st, 2004, 23:34
thanx but I don't think that is the problem b/c it still goes on. The problem is somwhere in the server I think. Check out what it says.
Just put name for the user name and pass for password
http://www.abusha.com/abush/enter.html

I hate this :doh!: :doh!: :doh!: :doh!: :doh!: :crying5: :crying5: :crying5:

kabatak
April 2nd, 2004, 00:04
well as it says "The requested method POST is not allowed"

Abush
April 2nd, 2004, 21:26
wow I remember when this forum used to be so helpful. :cry2: what a change!

kabatak
April 2nd, 2004, 22:12
dude, what i said means, that your server doesnt allow "POST" method, you know what mean.. in the HTML code.. you see this stuff in the form tag <form method="post">.. your host dont allow that thats why you cant do your stuff... you should contact them and ask why. i hope thats helpful, k.

Abush
April 3rd, 2004, 00:03
Nah I didn't mean you it's just that only you replied to the question. if it was about a year ago there would've been alot of replies. I already thanked your help and I realy apreciate it that atleast u tried to help. tnx

CareBear
April 3rd, 2004, 03:32
Your host doesn't support ASP.

bloodyveins
April 3rd, 2004, 05:00
CareBear:Your host doesn't support ASP.

He's absolutely right.

Notice the error message:


Method Not Allowed
The requested method POST is not allowed for the URL /abush/login.asp.
Apache/1.3.29 Server at www.abusha.com Port 80