Front:
<!--product Inquiries-->
<input type= "text" name= "Bianhao" value= "" maxlength= "" size= "" style= "width:100px; margin:0px 0px 0px 25px;height:20px; " />
<input type= "Submit" value= "Product number Query" style= "margin:0px 0px 0px 10px;cursor:pointer;background-color:# C30d23;border:0px;color: #FFFFFF; width:85px;border-radius:5px;padding:3px 0;font-size:13px; " />
PHP background to receive and query:
Public Function Malllist () {//write method
$goods =m (' shop_goods_info ');//instantiate database corresponding table
$codes =i (' Param.bianhao '); Gets the foreground text box data
if (Isset ($codes) && $codes!= ') {
$where [' Code ']= $codes;
$this->assign (' codes ', $codes); Display
}
$info = $classify->where (Array (' Code ' => $code))->find ();//query syntax
2. Or:
With $_get or $_post.
<form action= ' method= ' post ' >
text box: <input type= ' text ' name= ' text ' >
<input ' Submit ' value = ' Submit ', name= ' Sub ' >
</form>
<?php
if (!empty ($_post[' Sub ')) {
echo $_post[' text '];
}
? >
If it's a get, replace it
The above is a small set up to introduce PHP to get input into the value of the box to the database comparison show, I hope to help you, if you have any questions please give me a message, small series will promptly reply to everyone. Here also thank you very much for the cloud Habitat Community website support!