Beispiel #1
0
<?php

include "include/mysql1.inc.php";
include "check.php";
header("Content-Type:text/html;charset=utf-8");
if (isset($_POST['sbmit_x'])) {
    if (!empty($_POST['l']) && !empty($_POST['t']) && !empty($_POST['q'])) {
        $n1 = $_POST['l'];
        $n2 = $_POST['t'];
        $n3 = $_POST['q'];
        $search = new search($n1, $n2, $n3);
        echo $search->result();
    } else {
        header("Location:index.php");
    }
}
class search
{
    private $like;
    private $tb;
    private $key;
    function __construct($like, $tb, $key)
    {
        $this->like = $like;
        $this->tb = $tb;
        $this->key = $key;
    }
    function result()
    {
        switch ($this->like) {
            case 'like':