(初学)如何作一个简单的后台登录及如何与数据库连接,越简单越好,越详细越好!!只要能添加新闻就可以了!! 如果有现成的页面文件参考最好,可发我邮箱[email protected]谢谢!! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 ASP方面的?你可以到网上下载,例如www.aspsky.net中的动网先锋就很不错 ASP的,只要能提交,用户名登录就行。越简单越好,只要初学者(我)能看懂就行,能改成我的能用就行应急 <%@language=vbscript%><!--#include file="conn.asp"--><html><head><title></title><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><style type="text/css"><!--.publishdate { background-color: #CCCCCC;}--></style><link href="style.css" rel="stylesheet" type="text/css"><script language=javascript>function check(){ if(document.form1.title.value=="") { alert("标题不能为空"); return false; } if(document.form1.memo.value=="") { alert("内容不能为空"); return false; } }</script></head><body bgcolor="#FFFFFF" leftmargin="0" topmargin="10"><div align="center"> <form method="post" action="savenews.asp" name="form1" onsubmit="javascript:return check();"> <table width="95%" border="1" cellspacing="0" cellpadding="0" bordercolorlight="#000000" bordercolordark="#FFFFFF"> <tr bgcolor="#CCCCCC"> <td height="25"> <div align="center"><font size="2">新闻名称: </font></div></td> <td><font size="2"> <input name="title" type="text" size="50"> </font></td> </tr> <tr> <td height="30"> <div align="center"><font size="2">新闻类型: </font></div></td> <td height="30"><font size="2"> <select name="newstype" > <option value="医学动态" selected >医学动态</option> </select> </font></td> </tr> <tr> <td height="30"> <div align="center"><font size="2">发布时间: </font> </div></td> <td height="30"><font size="2"> <input name="publishdate" type="text" disabled="false" class="publishdate" value="<%=date()%>" size="9" > </font></td> </tr> <tr> <td height="30"> <div align="center"><font size="2">内容:</font></div></td> <td height="30"><font size="2"> <textarea name="memo" cols="50" rows="10"></textarea> </font></td> </tr> </table> <p> <input type="submit" name="Submit" value="确定"> </p> </form> <p></p> <p align=center></p> </div></body></html> savenews.asp<%@ Language=VBScript %><!--#include file="conn.asp"--><% title=(Request("title")) publishdate=date() newstype=(Request("newstype")) memo=Request("memo") sql="insert into news(title,publishdate,memo,type) values('" sql=sql&(title)&"','" sql=sql&(publishdate)&"','" sql=sql&(memo)&"','" sql=sql&(newstype)&"')" response.write sql conn.Execute sql conn.Close set conn=Nothing Response.Redirect "listnews.asp"%> conn.asp<% dim conn dim connstr Set conn = Server.CreateObject("ADODB.Connection")'设置SQL连接' connstr="driver={SQL Server}; server=wzw; UID=sa; PWD=admin; database=xjgzc"'设置Access连接 Connstr="DBQ="+server.mappath("../database/web.mdb")+";DefaultDir='';DRIVER={Microsoft Access Driver (*.mdb)};DriverId=25;FIL=MS Access;ImplicitCommitSync=Yes;MaxBufferSize=512;MaxScanRows=8;PageTimeout=5;SafeTransactions=0;Threads=3;UserCommitSync=Yes;" conn.Open Connstr%> 这个已经很简单了html页面用dm打开就看到了 Range.Select方法错误 求助]请教关于sql查询! 一个用Textout()在picturebox上输出文字的问题 各位大侠:关于控件MSFlexGrid有一个问题请教. 请问如何在程序VB程序中播放WAV的声音文件(急在线等待,马上给分) lihonggen0 水晶报表设计求助 vb程序运行一晚后奔溃,异常代码: 0xc0000005 VB好友会 加载窗口的问题,昨天的一波高手都未给出最佳方案……分值不封顶~ 急急急,请问如何可以得到 Access 中表的列名?(在线等待!!!) 急,高手请进
<!--#include file="conn.asp"-->
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
.publishdate {
background-color: #CCCCCC;
}
-->
</style>
<link href="style.css" rel="stylesheet" type="text/css">
<script language=javascript>function check(){
if(document.form1.title.value=="")
{
alert("标题不能为空");
return false;
}
if(document.form1.memo.value=="")
{
alert("内容不能为空");
return false;
}
}</script>
</head><body bgcolor="#FFFFFF" leftmargin="0" topmargin="10">
<div align="center">
<form method="post" action="savenews.asp" name="form1" onsubmit="javascript:return check();">
<table width="95%" border="1" cellspacing="0" cellpadding="0" bordercolorlight="#000000" bordercolordark="#FFFFFF">
<tr bgcolor="#CCCCCC">
<td height="25"> <div align="center"><font size="2">新闻名称: </font></div></td>
<td><font size="2">
<input name="title" type="text" size="50">
</font></td>
</tr>
<tr>
<td height="30"> <div align="center"><font size="2">新闻类型: </font></div></td>
<td height="30"><font size="2">
<select name="newstype" >
<option value="医学动态" selected >医学动态</option>
</select>
</font></td>
</tr>
<tr>
<td height="30"> <div align="center"><font size="2">发布时间: </font> </div></td>
<td height="30"><font size="2">
<input name="publishdate" type="text" disabled="false" class="publishdate" value="<%=date()%>" size="9" >
</font></td>
</tr>
<tr>
<td height="30"> <div align="center"><font size="2">内容:</font></div></td>
<td height="30"><font size="2">
<textarea name="memo" cols="50" rows="10"></textarea>
</font></td>
</tr>
</table>
<p>
<input type="submit" name="Submit" value="确定">
</p>
</form>
<p></p>
<p align=center></p> </div>
</body>
</html>
<%@ Language=VBScript %>
<!--#include file="conn.asp"-->
<%
title=(Request("title"))
publishdate=date()
newstype=(Request("newstype"))
memo=Request("memo") sql="insert into news(title,publishdate,memo,type) values('"
sql=sql&(title)&"','"
sql=sql&(publishdate)&"','"
sql=sql&(memo)&"','"
sql=sql&(newstype)&"')" response.write sql
conn.Execute sql
conn.Close
set conn=Nothing Response.Redirect "listnews.asp"
%>
<%
dim conn
dim connstr
Set conn = Server.CreateObject("ADODB.Connection")
'设置SQL连接
' connstr="driver={SQL Server}; server=wzw; UID=sa; PWD=admin; database=xjgzc"
'设置Access连接
Connstr="DBQ="+server.mappath("../database/web.mdb")+";DefaultDir='';DRIVER={Microsoft Access Driver (*.mdb)};DriverId=25;FIL=MS Access;ImplicitCommitSync=Yes;MaxBufferSize=512;MaxScanRows=8;PageTimeout=5;SafeTransactions=0;Threads=3;UserCommitSync=Yes;"
conn.Open Connstr
%>
html页面用dm打开就看到了