一个用mysql_odbc和php写的serach数据库程序

htmlheadmeta content=text/html; charset=gb2312title查询条件/titlemeta
name=GENERATOR content=Microsoft FrontPage 3.0/headbody
bgcolor=#澳门新浦京app下载,fcf8c2p查询条件 /pform action=searchyh.php method=posttable
border=1 width=43% height=34trtd width=100% height=28用户名称: input
type=text name=name size=20/tdtd width=100% height=28用户地址: input
type=text name=add size=20/tdtd width=100% height=28用户电话: input
type=text name=tel size=20/td/tr/tablepinput type=submit value=提交查询
/p/form/body/html//后台PHP?phpecho body bgcolor=’#fcf8c2′;echo
查询结果:;echo ;echo ;$conn = odbc_connect(blue, root, );$name .=%;$add
.=%;$tel .=%;$query = select * ;$query .= from jc_yh where (name like
‘$name’ and address like’$add’ and tel like ‘$tel’ );odbc_result_all(
odbc_do($conn, $query), border=1
width=50%);odbc_close($conn);?///表结构CREATE TABLE jc_yh (id int not
null default 0,name varchar(80) not null default blue,city varchar(40)
not null default xn,tel varchar(14) not null default 00000000000000,fax
varchar(14) not null default 00000000000000,address varchar(60) not null
default xn,post varchar(6) not null default 000000);

//后台PHP”;echo “查询结果:”;echo ” “;echo ” “;$conn =
odbc_connect(“blue”, “root”, “”);$name .=”%”;$add .=”%”;$tel
.=”%”;$query = “select * “;$query .= “from jc_yh where (name like
‘$name’ and address like’$add’ and tel like ‘$tel’ )”;odbc_result_all(
odbc_do, “border=1 width=50%”);odbc_close;?>///表结构CREATE TABLE
jc_yh (id int not null default 0,name varchar not null default
“blue”,city varchar not null default “xn”,tel varchar not null default
“00000000000000”,fax varchar not null default “00000000000000”,address
varchar not null default “xn”,post varchar not null default “000000”);

You can leave a response, or trackback from your own site.

Leave a Reply

网站地图xml地图