$urlList = array_merge($urlList, getPtcUrl($db, $arg));
    // Get medication name urls
    $urlList = array_merge($urlList, getNameUrl($db, $arg, "ptc"));
    // Takes the isolated URLs to collect the full data
    if (count($urlList) > 0) {
        $outputArray = queryComplete($db, $urlList, "ptc");
    }
    return $outputArray;
}
$response = "";
$tempArray;
$htmlList = array();
// Get parameters from URL
$searchString = $_GET["search"];
$methodATC = boolConvert($_GET["methodATC"]);
$methodPTC = boolConvert($_GET["methodPTC"]);
// Only run search if $q is not blank
if (strlen($searchString) > 0) {
    $resultArray = array();
    // Adding wildcard markers to query
    $q = "%" . $searchString . "%";
    // Establish database connection
    $db = new PDO('mysql:host=localhost;dbname=studybuf_abc_dbl', 'studybuf_abc_vw', 'bbZMZ*Fl%[1ANQqFM~');
    $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
    // ATC Query
    if ($methodATC === true) {
        $tempArray = processAtc($db, $q);
        if (count($tempArray) > 0) {
            $resultArray = array_merge($resultArray, $tempArray);
        }
    }
<?php

//to be changed.....................................
function boolConvert($var)
{
    if ($var == 0) {
        return "False";
    }
    return "True";
}
$tp = $DBVARS['tp'];
$tutorials = dbAll('select * from ' . $DBVARS['tp'] . 'tutorial order by id');
echo '<table style="width:100%">
<tr><th>Id</th><th>Posted By</th><th>Title</th><th>Validated</th></tr>';
foreach ($tutorials as $tutorial) {
    $uname = dbRow('SELECT l.uname FROM ' . $tp . 'tutorial t,' . $tp . 'login l WHERE t.postedBy=l.uid;');
    echo '<tr><th><a href="tutorials.php?id=' . $tutorial['id'] . '">' . $tutorial['id'] . '</a></th>';
    echo '<th><a href="tutorials.php?id=' . $tutorial['id'] . '">' . $uname['uname'] . '</a></th>';
    echo '<th><a href="tutorials.php?id=' . $tutorial['id'] . '">' . $tutorial['title'] . '</a></th>';
    echo '<th><a href="tutorials.php?id=' . $tutorial['id'] . '">' . boolConvert($tutorial['isValidated']) . '</a></th>';
    echo '<td><a href="tutorials.php?id=' . $tutorial['id'] . '">edit</a>';
    echo '&nbsp;<a href="tutorials.php?id=' . $tutorial['id'] . '&amp;action=delete" onclick="return confirm(\'are you sure you want to delete this tutorial?\')">[x]</a></td></tr>';
}
echo '</table>';
echo '<a class="button" href="tutorials.php?step=1&amp;id=-1">
Create Tutorial</a>';
$tutorials = array();
if ($validator != false) {
    global $tutorials;
    $tutorials = dbAll('SELECT * FROM ' . $tp . 'tutorial t, ' . $tp . 'tutorial_validator tv WHERE t.id=tv.tutorial_id AND tv.validator_id=' . $validator['id'] . ';');
}
?>

<!-- <article class = "main">
                <div class = "innerColumn">-->
<?php 
echo '<table style="width:100%">
<tr><th>Id</th><th>Posted By</th><th>Title</th><th>Validated</th></tr>';
if (count($tutorials) == 0) {
    echo '<tr><th colspan="4">No Records Found</th></tr>';
    echo '</table>';
} else {
    foreach ($tutorials as $tutorial) {
        echo '<tr><th><a href="/cms.user/index.php?feature=tutorials&amp;view=one&amp;review=one&amp;id=' . $tutorial['id'] . '">' . $tutorial['id'] . '</a></th>';
        echo '<th><a href="/cms.user/index.php?feature=tutorials&amp;view=one&amp;review=one&amp;id=' . $tutorial['id'] . '">' . $user['uname'] . '</a></th>';
        echo '<th><a href="/cms.user/index.php?feature=tutorials&amp;view=one&amp;review=one&amp;id=' . $tutorial['id'] . '">' . $tutorial['title'] . '</a></th>';
        echo '<th><a href="/cms.user/index.php?feature=tutorials&amp;view=one&amp;review=one&amp;id=' . $tutorial['id'] . '">' . boolConvert($tutorial['isValidated']) . '</a></th>';
        echo '<td><a href="/cms.user/index.php?feature=tutorials&amp;view=one&amp;review=one&amp;id=' . $tutorial['id'] . '">view</a>';
        //    echo '&nbsp;<a href="/cms.user/index.php?view=true&amp;id='.$tutorial['id'].'&amp;action=delete" onclick="return confirm(\'are you sure you want to delete this tutorial?\')">[x]</a></td></tr>';
    }
    echo '</table>';
}
//echo '<a class="button" href="/cms.user/index.php?feature=tutorials&amp;create=true&amp;step=1&amp;id=-1">Create Tutorial</a>';
?>
<!-- </div>
            </article>-->