找个高手补全代码。一个查询功能。多谢.就55分了,都上了

WBOY
Release: 2016-06-13 13:49:27
Original
1157 people have browsed it

找个高手补全代码。一个查询功能。谢谢.就55分了,,都上了
想做一个简单查询功能。通过查询可以得出下面的表格。
需要高手帮我填写PHP代码。



库里这样的


部分代码如下:gb2312











 









车牌号码 京Dxxxxxxx
归属地 北京市


------解决方案--------------------
注意文本文件的bom头问题。
PHP code

<?php header('Content-Type:text/html;charset=utf-8');
$head = '';
$ower = '';
$number = '';
if (isset($_POST['button']))
{
    $head = $_POST['province'].$_POST['letter'];
    $number = $_POST['t'];
    $data = array();
    $fp = fopen('sql.txt','r');
    while (!feof($fp))
    {
        $tmp = fgets($fp);
        list($key,$value) = preg_split("/[\s]+/", $tmp);
        $data[] = array($key,$value);
    }
    $ower = '没有数据';
    foreach ($data as $v)
    {
        if ($v[0] == $head)
        {
            $ower = $v[1];
            break;
        }
    }
}
?>



<title></title>


Copy after login
车牌号码
归属地
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!