ASP这个程序怎么做!

来源:百度知道 编辑:UC知道 时间:2024/06/04 03:35:12
ASP这个程序怎么做!当用户第一次登录时将显示出提示输入用户名的文本框,提交表单后,服务器将把输入的用户名写入到用户的浏览器中。当用户再次登录本网站的主页时,将不再需要用户输入用户名了,而是直接显示欢迎用语

写一个公共文件
check.asp 判断是否登录过
<%
user=request.cookie("user") '提取登录信息
if user="" then
response.write("<a href=""login.html"">请登录</a>")
else
response.write("您好'"&user&"',欢迎您!")
end if
%>
登录页面
<%

if login="登录成功" then
response.cookie("user")=user '把用户名写到浏览器中
end if
%>