用于显示搜索结果的HTML动态表

时间:2014-04-21 20:49:00

标签: php forms search

使用以下表单从数据库中获取和显示搜索项。

                <?php
                include('search.class.php');
                $search = new search;
                //table to search
                $search->table = 'xxxxxx';
                //array to show results
               $result = array('Column1', 'column2');
                ?>
              <p> Insert a field to search</p>
              <p> For user between, an not between, use the boollean operator AND </p>
               <p> For search with more words, use the boollean operator OR</p>
               <form action="<?=$_SERVER['PHP_SELF']?>" method="post">
                <?=$search->fieldSelect()?>
                <?=$search->whereSelect()?>
                <?=$search->fieldText(10,20)?>
                <input type="submit" name="submit" value="submit" />
                </form>
                 <?=$search->result($result)?>

结果显示在最后一行之后。

如何在整洁的桌子上展示它们?

0 个答案:

没有答案