<?php
function ftab($db_stat, $tname, $colname) {
    require 'data.php';

    $fdb = "SELECT ".$db_stat." FROM ".$tname." LIMIT 1";
    $qdb = mysqli_query($data, $fdb);

    if(mysqli_num_rows($qdb) > 0) {
        $fetch = mysqli_fetch_assoc($qdb);
        return html_entity_decode($fetch[$colname]);
    }


}

function fwtab($db_stat, $tname, $colname, $cond1, $cond2) {
    require 'data.php';
  
    $fdb = "SELECT ".$db_stat." FROM ".$tname." WHERE ".$cond1." = '".$cond2."' ";
    $qdb = mysqli_query($data, $fdb);
  
    if(mysqli_num_rows($qdb) > 0) {
        $fetch = mysqli_fetch_assoc($qdb);
        echo html_entity_decode($fetch[$colname]);
    }
  
  
  }

?>