日期:2014-05-17 浏览次数:20627 次
<?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; } } } ?> <!DOCTYPE HTML> <html> <head> <title></title> </head> <body> <form name="form1" action="car.php" method="post"> <div align="center"> <select id="select" name="province"> <option value="京">京</option> <option value="黑">黑</option> <option value="沈">沈</option> </select> <select id="select2" name="letter"> <option value="A">A</option> <option value="B">B</option> <option value="C">C</option> <option value="D" selected="selected">D</option> <option value="99">其它</option> </select> <input name="t" type="text" size="15" maxlength="5" value="" /> <input type="submit" name="button" value="查询" /> </div> <table width="300" border="0" cellpadding="0" cellspacing="0" bgcolor="#C5D5C5" align="center"> <tr><td>