conn.php文件
代码如下 | 复制代码 |
<html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <script > var xmlhttp function showhint(str) { if (str.length==0) { document.getelementbyid("txthint").innerhtml="" return } xmlhttp=getxmlhttpobject() if (xmlhttp==null) { alert ("browser does not support http request") return } xmlhttp.onreadystatechange=statechanged var geturl="conn.php?q="+str </script> |
代码如下 | 复制代码 |
<?php $q=$_get["q"]; $q = urldecode($q); if (strlen($q) > 0) ?> |
数据库
drop database if exists `xin`;
create database `xin` /*!40100 default character set utf8 */;
use `xin`;
create table `message` (
`id` int(11) not null auto_increment,
`username` varchar(20) default null,
primary key (`id`)
) engine=innodb auto_increment=2 default charset=utf8