Click to See Complete Forum and Search --> : does this work


sicknote
05-14-2005, 02:03 PM
i was woudering if this worked

this is page source code is called login.asp


<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Results -- Login</title>
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
</head>

<body bgcolor="#FFFFFF">

<FORM ACTION="Login_Validate.asp" METHOD="post">

<p>
&nbsp;<h3Login</h3>
<br>
<p>
<TABLE BORDER=0>
<TR>
<TD ALIGN="right">User name:</TD>
<TD><INPUT TYPE="text" NAME="login" size="10" VALUE=''></INPUT></TD>
</TR>
<TR>
<TD ALIGN="right">Password:</TD>
<TD><INPUT TYPE="password" NAME="password" size="10" VALUE=''></INPUT></TD>
</TR>
<TR>
<TD>
<input TYPE="hidden" NAME="requester" VALUE="<%=Server.HtmlEncode(Request("requester"))%>">
</TD>
<TD>
&nbsp;
</TD>
</TR>
<TR>
<TD align="left">
<INPUT TYPE="submit" VALUE="Login"></INPUT>
</TD>
<TD>
</TD>
</TR>
</TABLE>
</FORM>

</body>
</html>


and then this page is called Login_Validate.asp


<!--#include file="login.asa"-->


<%
' if any of the variables do not match, create error message
if Request.Form("login") <> Username or Request.Form("password") <> Password then
MsgErr = "<h3>Authorization Failed.</h3>" & "<br>" & "<a href=login.asp>Please try again.</a>"
Response.Write MsgErr
Else
Session(SiteId) = true


' redirect
If Len(Request("requester")) > 0 Then
Response.Redirect (Request("requester"))
Else
Response.Redirect "database_editor.asp"
End if

End if
%>

<body bgcolor="#FFFFFF">


and this is called login.asa which is the database for everything included in this page


<%
SiteId="{BF25167A-8DF3-4865-9AF0-BEABC7D89585}"
Username="Username"
Password="Password"
%>


if anyone could help then it would be grately appriciated

thanks

phpnovice
05-14-2005, 07:45 PM
i was woudering if this worked

if anyone could help then it would be grately appriciated
Wondering if what works?
Help with what?

sicknote
05-15-2005, 05:28 AM
help me by telling me wether it works

buntine
05-15-2005, 05:44 AM
Why don't you run it and see? That would be the logical course of action.

It looks fine from here. But you can't be sure until you have tested it.

Regards.

sicknote
05-16-2005, 11:35 AM
ive tested it

but it dont like asp

phpnovice
05-16-2005, 11:52 AM
If you're getting error messages, tell us what they are. If it is displaying the ASP code in the browser, then the ASP code is not being interpretted. This can be for one of two reasons... Either your site host does not support ASP, or you are trying to run ASP code as a local file from your PC. For the first problem... Are you hosting your own site? ...or, are you using an IPP to host your site? For the second problem... You must publish the ASP document to a server so that the ASP code can be interpreted by the server. As mentioned... Such a server can be either on your own local PC or provided on the Internet by an IPP.

IPP = Internet Presence Provider