我的网页客户登陆后不显示信息

来源:百度知道 编辑:UC知道 时间:2024/05/17 04:01:34
下面是我的网页登陆后的页面代码,哪位帮忙给看看,
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>欢迎光临</title>
</head>
<%
Session.Timeout=10
if session("pass")<>"action1" then
response.Redirect("logon.asp")
Response.End
end if
%>
<body>
<h1 align="center"> </h1>
<h1 align="center">登录成功! </h1>
<div align="center">
<center>
<table border="1" cellpadding="4" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="760" height="100">
<tr>
<td align="center">
<div align="center">

<%=session("user_name")=user_name%> 修改成 <% session("user_name")=user_name %> 就是去掉等号嘛,如果你那样就是语法错误了哟

<%=session("user_name")=user_name%> 这一句错误,这个不可以这样写,你应该<%if session("user_name")<>"" then session("user_name")=user_name end if%> ,这里再用<%=user_name%>这个调用

不用,你的这个user_name取的是session变量,又不是从数据库直接取的。
session应该是你登陆成功的时候,写的。