Date:  01/24/2006 05:36:00 PM Msg ID:  002822
From:  Ali Koumaiha Thread:  002821
Subject:  Re: Can I redirect a page like this?
it is a foxweb command.  you need it inside the <%> not outside.
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
m.action="login.fwx"
IF Request.FormCount("User_id") <> 0


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

 

 If _Tally>0
    %>response.redirect("new_page.fwx")<%
 ELSE
  %><h4><center> Sorry. User ID or Password is not correct. </center></h4><%
 ENDIF
ENDIF
%>

 

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

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