<form action= "searchyh.php" method= "POST" >
<table border= "1" width= "43%" height= ">"
<tr>
<TD width= "100%" height= "> User name: <input type=" text "name=" name "size=" ></td>
<TD width= "100%" height= ">" User address: <input type= "text" name= "Add" size= "" ></td>
<TD width= "100%" height= "> User tel: <input type=" Text "name=" tel "size=" ></td>
</tr>
</table>
<p><input type= "Submit" value= "submitting query" > </p>
</form>
</body>
Background php
<?php
echo "<body bgcolor= ' #fcf8c2 ' >";
echo "Query result:";
echo "
";
echo "
";
$conn = Odbc_connect ("Blue", "root", "");
$name. = "%";
$add. = "%";
$tel. = "%";
$query = "SELECT *";
$query. = "from the jc_yh where (name like ' $name ' and" as ' $add ' and tel like ' $tel ') ";
Odbc_result_all (Odbc_do ($conn, $query), "Border=1 width=50%");
Odbc_close ($conn);
?>
Table structure
CREATE TABLE Jc_yh (
ID int NOT NULL default 0,
Name varchar NOT NULL default "blue",
City varchar is not null default "xn",
Tel varchar NOT NULL default "00000000000000",
Fax varchar NOT NULL default "00000000000000",
Address varchar is NOT NULL default "xn",
Post varchar (6) NOT NULL default "000000");
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.