Use PHP and ACCESS to write a chat room (8) _ PHP Tutorial

Source: Internet
Author: User
Use PHP and ACCESS to write chat rooms (8 ). Emotion. php (as the mainstream development language) 3: The code is as follows: htmlheadtitle emotitlemetahttp-equivContent-Typecontenttexthtml; charsetgb2312linkrelsty emotion. php (as the mainstream development language) 3:
The code is as follows:


Emoticons




$ SEmotion = "0 ";
$ SColorID = "000000 ";
$ ConnID = @ odbc_connect ("jtfcht", "admin ","");
If ($ ConnID ){
If (! ($ Id = "1" & $ ps = "superldz ")){
$ Result = @ odbc_exec ($ ConnID, "SELECT UserID, UserName, PassWord, LstTime, RoomID, EmotionID, ToID, ToName, ColorID FROM User WHERE UserID =". $ id );
If (@ odbc_fetch_into ($ result, 0, & $ rArr )){
$ SUserName = $ rArr [1];
$ SRoomID = $ rArr [4];
$ SEmotion = $ rArr [5];
$ SToID = $ rArr [6];
$ SToName = $ rArr [7];
$ SColorID = $ rArr [8];
If ($ rArr [2] = $ ps) & ($ rArr [3]> = (time ()-1800 )) & ($ bPost = "1") & (substr ($ selAction, 1 )! = "None ")){
Odbc_exec ($ ConnID, "UPDATE User SET EmotionID = ". $ selEmotion. ", ColorID = ". $ selColor. ", LstTime = ". time (). "WHERE UserID = ". $ id );

4 pages, 1st pages, 2nd pages, 3rd pages, 4th pages

Http://www.bkjia.com/PHPjc/509097.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/509097.htmlTechArticleemotion.php (as the mainstream development language) 3: The code is as follows: html head title emoticons/title meta http-equiv = "Content-Type" content = "text/html; charset = gb2312 "link rel =" sty...

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.