View Complete Thread | FoxWeb Forum Home
Date:    Msg ID:   
From:    Thread:   
Your code does not work, because you placed the Response.Redirect command outside the code delimiters.  It should look like this instead:


If _Tally>0


By the way, even though the Response.Redirect command will work, I recommend that you use Server.Transfer, or Server.Execute instead.  Response.Redirect sends an HTTP redirect header to the browser, so it requires an extra round-trip.
I assume that you are not using the Auth object for authentication right?  Is there a reason for this?  We have put a lot of work in making the Auth object really secure and easy to use.

FoxWeb Support Team email

Sent by Larry Zhang on 01/24/2006 10:26:25 AM:
Can I switch to a new page if user id is found?

set step on
IF Request.FormCount("User_id") <> 0

   WHERE UPPER(Allt(Code)) == UPPER(Allt(Request.Form("User_ID"))) ;
   INTO CURSOR results


 If _Tally>0
  %><h4><center> Sorry. User ID or Password is not correct. </center></h4><%


<form action="login.fwx" method="post">
<input name="User_id" maxlength="30" value="<%=Request.Form("User_ID")%>" size="20">
<input type="image" src="images/btnNext.gif" height="15" width="15">

It seems the respons.redirect line does not work. What command shall I use. Thank you in advance.