关于ASP的问题,请求帮助.谢谢!

来源:百度知道 编辑:UC知道 时间:2024/05/20 15:28:00
在一个页面上有自动生成的时间,IP和用户名,需要提交到数据库.但现在这三项现在是可改的,请问我如何把这些变成只可见不可改的?请帮帮我,我就这些分了.我有Q币可以给.

第一个:formSub.asp

<!--#include file="config/config.asp"-->
<%
id=request.querystring("id")
phonenumber=request.querystring("phone")
t=now()

str="delete from userinfo where serno="+ id
conn.execute str
ip = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
If ip = "" Then ip = Request.ServerVariables("REMOTE_ADDR")
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>提交页面</title>
</head>

<body>
<table>
<form action="formSub2.asp" method="post">
<tr>
<td>phonenumber</td><td><input type="text" value="<%=phonenumber%>

加一个输入框的属性readonly,把它设为只能看,不能改的,比如这个
<input type="text" value="<%=t%>" name="time" readonly>

<%=phonenumber%>直接这样显示不完了,不放到输入框里

呵,很简单,有几个方式:
1。使用<%=变量%>直接显示,然后<input name=*** type=hidden value=<%=变量%>>
2.使用<input name=*** type=text readonly value=<%=变量%>>

第一个:formSub.asp

<!--#include file="config/config.asp"-->
<%
id=request.querystring("id")
phonenumber=request.querystring("phone")
t=now()

str="delete from userinfo where serno="+ id
conn.execute str
ip = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
If ip = "" Then ip = Request.ServerVariables("REMOTE_ADDR")
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>提交页面&