如何点击当前内容能连到数据库中????

来源:百度知道 编辑:UC知道 时间:2024/06/08 21:35:04
我用的是ASP连接数据库的

其实我的意思是网页中有现成的 两个文字 ,点击 他们时内容能传到数据库,给个最简单的实例.之前我用表单中的控件时都有name这个变量的,那些我会了..但现在通过文字连接的我不会..

给个最简单的例子....
sql="select * from wwork where content="&request.querystring("content") order by reid desc"

又到这句有问题了

<a href="search.asp?title=张三" >张三</a>
然后写个search.asp
里面用request("title") 就可以接收张三这个值,然后处理

sql="select * from wwork where content="&request.querystring("content") order by reid desc"
是不是content是文本型的字段
要写成
sql="select * from wwork where content='"&request.querystring("content") & "' order by reid desc"