我在登陆,注册的时候连接到ASP文件中!但我登录成功后显示用户名在以前的框架中要怎么做
<FORM name="form1" method="post" action="/asp/Checkuser.asp" onSubmit="return form1Click()" >
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR height=30>
<TD> 用户名:</TD>
<TD><INPUT class=input_text size=16 name="nick"> </TD></TR>
<TR height=30>
<TD> 密 码:</TD>
<TD><INPUT class=input_text type=password size=16
name="password"> </TD></TR>
<TR height=30>
<TD colSpan=2>
<INPUT type=submit value=登录 >
<INPUT name="按钮" type=button onClick="javascript: this.form.action='asp/Register.asp';this.form.submit();" value=注册></TD></TR></TBODY></TABLE>
</FORM>
参考答案:在“/asp/Checkuser.asp”中记录
<%session("nick")=request.form("nick")%>
然后在你登录的页面用一个IF 语句,
if session("nick")<>"" then
response.write("&session("nick")&")
else
<FORM name="form1" method="post" action="/asp/Checkuser.asp" onSubmit="return form1Click()" >
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR height=30>
<TD> 用户名:</TD>
<TD><INPUT class=input_text size=16 name="nick"> </TD></TR>
<TR height=30>
<TD> 密 码:</TD>
<TD><INPUT class=input_text type=password size=16
name="password"> </TD></TR>
<TR height=30>
<TD colSpan=2>
<INPUT type=submit value=登录 >
<INPUT name="按钮" type=button onClick="javascript: this.form.action='asp/Register.asp';this.form.submit();" value=注册></TD></TR></TBODY></TABLE>
end if