中小型企业内部网(Intranet)的实现
end if
if Url="" then
Url=" "
else
Url = Left( Url, 50 )
end if
if Country="" then
Country=" "
else
Country = Left( Country,10)
end if
if State="" then
State=" "
else
State = Left( State,10)
end if
if City="" then
City=" "
else
City = Left( City,10)
end if
’定义SQL语句,将信息加入数据库中
sql = "Insert Into Guestbook (Name, Email, Url, Country,State,City,Comments) Values( "
sql = sql & SqlStr(Name) & ", "
sql = sql & SqlStr(Email) & ", "
sql = sql & SqlStr(Url) & ", "
sql = sql & SqlStr(Country) & ", "
sql = sql & SqlStr(State) & ", "
sql = sql & SqlStr(City) & ", "
sql = sql & SqlStr(Comments) & ")"
’执行SQL语句
conn.Execute sql
’自动转至查看留言薄页面
Response.Redirect "guestbook.asp"
end if
%>
<html>
<head>
<title>留言处理</title>
</head>
<body background="INMTEXTB.GIF">
<p></p>
’ 如果姓名和内容为空,给出提示信息
<p align="center"> <big> <font color="#FF0000" face="仿宋_GB2312"><strong>姓名和留言必须输入!</strong></font></big></p>
《中小型企业内部网(Intranet)的实现(第12页)》