Find a master to complement the full code. A query function. Thank you, it's 55 minutes, it's all over.
Want to do a simple query function. The following table can be obtained by querying.
Need a master to help me fill in the PHP code.
In a library like this.
Some of the code is as follows: gb2312
BeijingBlackShen
ABCDOther
| License plate number |
Beijing dxxxxxxx |
| Place of Attribution |
Beijing |
|
------Solution--------------------
Note the BOM header problem for the text file.
PHP code
!--? php header (' content-type:text/html;charset= Utf-8 '); $head = '; $ower = '; = '; if (isset ($_post[' button ')) {$head = $_post[' province '].$_post[' letter ']; = $_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 = ' no data '; foreach ($data as $v) {if ($v [0] = = $head) {$ower = $v [1]; Break }}}?-->