Flash Message board making two
This article is mainly about the production of Flash message board and provide flash message board source files and Asp+flash message board the ultimate goal is to let you use Flash to make the message board, now we look at ASP file is how to deal with the file sent by Flash.
<% @LANGUAGE = "VBSCRIPT" codepage= "65001"%>
<%response.charset= "Utf-8"%>
<%session.codepage = "65001"%>
<body>
<%
Dim Conn,rs,username,word
Username=request ("username")
Word=request ("word")
Set conn=server.createobject ("ADODB. Connection ")
conn.connectionstring = "dbq=" &server.mappath ("Liouyan.mdb") & "; Driver={microsoft Access Driver (*.mdb)} "
Conn.Open
Sql= "INSERT into UserInfo (Username,word) VALUES (' &username&" ', ' "&word&") "
Conn.execute (SQL)
Conn.close
Set conn=nothing
%>
</body>
The above is to save the data to the data,
<% @LANGUAGE = "VBSCRIPT" codepage= "65001"%>
<%
Option Explicit
Response.contenttype= "Text/xml"
Dim conn,rs,sql,i
Set conn=server.createobject ("ADODB. Connection ")
conn.connectionstring = "dbq=" &server.mappath ("Liouyan.mdb") & "; Driver={microsoft Access Driver (*.mdb)} "
Conn.Open
Set Rs=server.createobject ("ADODB. RecordSet ")
Sql= "SELECT * from UserInfo"
Rs.Open sql,conn,1,1
I=1
Response.Write ("<?xml version=" 1.0 ' encoding= ' utf-8 '?><userinfo> ')
Do but not Rs. Eof
Response.Write ("<information><username><![ cdata["&rs (" username ") &"]]></username><sayinfo><! [Cdata[&rs ("word") & "]]></sayinfo></information>")
Rs.movenext
I=i+1
Loop
Response.Write ("</userinfo>")
Rs.close
Set rs=nothing
Conn.close
Set Conn =nothing
%>
This is to display the data as an XML document for flash reading and output. It's so simple, and the other is basically parsing xml y