Flash Message board making two

Source: Internet
Author: User
Tags cdata

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.