Forums
This topic is locked
Login Error Message
Posted 05 Sep 2002 17:18:12
1
has voted
05 Sep 2002 17:18:12 Perry Gascoine posted:
I have built a login page. If the user enters a wrong password it bounces them back to the loginpage but I would like it to show a message saying something like "Incorrect password / user name".Do I need to have two login pages ie one with no error message and one with the error message or is there something that UD can do?
Replies
Replied 05 Sep 2002 18:09:23
05 Sep 2002 18:09:23 Keith Slater replied:
The easiest way is to use two pages. you can use one page if you know how to use basic IF statements, but thats hand coding.
Keith Slater
Keith Slater
Replied 05 Sep 2002 19:04:37
05 Sep 2002 19:04:37 aegis kleais replied:
Actually, Macromedia login creates a variable called Session("MM_Username"
upon successful login. So as long as they're not entering a password (and as long as any valid session is not active) you could use the following code:
<%
IF (Session("MM_Username"
= ""
THEN
Notice = "<b><font color=red>Invalid Username or Password</font></b>"
END IF
%>
And later on in the page you can place:
<%= Notice %>
If the Notice contains text, it'll show up then.
Aegis Kleais
New Media Web Developer
(DWMX : IIS5.1 : SQL2K : WXP : ASP[VB/JS])
Edited by - aegiskleais on 05 Sep 2002 19:04:59
Edited by - aegiskleais on 05 Sep 2002 19:05:16
<%
IF (Session("MM_Username"
Notice = "<b><font color=red>Invalid Username or Password</font></b>"
END IF
%>
And later on in the page you can place:
<%= Notice %>
If the Notice contains text, it'll show up then.
Aegis Kleais
New Media Web Developer
(DWMX : IIS5.1 : SQL2K : WXP : ASP[VB/JS])
Edited by - aegiskleais on 05 Sep 2002 19:04:59
Edited by - aegiskleais on 05 Sep 2002 19:05:16