简体   繁体   中英

Displaying results by refreshing php page after DB browsing

I would like to ask you for some manuals/ guidance about the displaying browsing results by refreshing the page. What I mean is engine similar to the one in the internet shops, where you are typing some keywords, they are browsed in the database, then page is reloading and they are displayed. I already have system to browse DB and to visualise it. Just the refreshing page for sake of display is the issue. I would like to send there two variables!

sharing my solution

    $sorgu="ara";
if(isset($_GET[$sorgu])){if(!$_GET[$sorgu]==''){$value=$_GET[$sorgu];
$donem=donem_bul_get();
$tablead="ogrenci_".strtohex($donem);
        $data_cek = $con->prepare("SELECT id,v1,v2,v26,v27,v28 FROM $tablead");
        $data_cek -> execute();
        $data_cek = $data_cek -> fetchAll();
    print("<table style='font-size:0.59em;' class='table table-bordered table-condensed table-striped table-hover'><tbody>");
foreach($data_cek as $val)
{
    foreach($val as $line)
    {
        $konum = strpos(strtolower($line),strtolower($value));
        if($konum === false){}else{
        echo "<tr><td><div class='no_pointer' onclick=\"javascript:show_usr_ara('".$val['id']."','".$tablead."');\">".$line.'&nbsp;|&nbsp;'.$val['v1'].'&nbsp;'.$val['v2'].'&nbsp;|&nbsp;'.$val['v27'].'/'.$val['v28'].'||'.$val['v26'].'</div></td></tr>';
        //$key = array_search ($line, $val);if($key=='v1'){$key='ad';}if($key=='v2'){$key='soyad';}echo "<button>".$key.':'.$line.'</button>';
        break;
        }
    }
}
    print("</tbody></table>");
}}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM