$orderBy = filter_input(INPUT_GET, 'orderBy');
    switch ($columnsOrder) {
        case "id":
            $data = getALLTestData($columnsOrder, $orderBy);
        case "corp":
            $data = getALLTestData($columnsOrder, $orderBy);
        case "incorp_dt":
            $data = getALLTestData($columnsOrder, $orderBy);
        case "email":
            $data = getALLTestData($columnsOrder, $orderBy);
        case "owner":
            $data = getALLTestData($columnsOrder, $orderBy);
        case "zipcode":
            $data = getALLTestData($columnsOrder, $orderBy);
        case "phone":
            $data = getALLTestData($columnsOrder, $orderBy);
            ?>
        <table class="table">
            <thead>
                
            </thead>
         <?php 
            foreach ($data as $row) {
                ?>
<!-- table of results -->
                <tr>
                    <td><?php 
                echo $row['id'];
                ?>
</td>
                    <td><?php 
Example #2
0
        $stmt = $db->prepare("SELECT * FROM corps");
}
if ($stmt && $stmt->execute($org)) {
    $results = $stmt->fetchAll(PDO::FETCH_ASSOC);
}
?>
       
        <!-- table -->
    <center>
        <br/><br/>
        
            <?php 
if ($action === 'View All') {
    $searchby = filter_input(INPUT_POST, 'searchby');
    $orderBy = filter_input(INPUT_POST, 'orderBy');
    $oresults = getALLTestData($searchby, $orderBy);
}
?>
        
        
<!--Header Image-->
    <img src="image/AC3.png" alt="AC" height="100" width="500">
    </center>
        <br/>
        <table class="table table-striped">
            <thead>
                    <th>Atlas Corporations:</th>
                    <th>Date:</th>
                    <th>E-mail:</th>
                    <th>Zip code:</th> 
                    <th>Owner:</th> 
<!DOCTYPE html>

<html>
    <head>
        <meta charset="UTF-8">
        <link rel="stylesheet" href="css/bootstrap.css">
        <title></title>
    </head>
    <body>
        <?php 
//connecting to the database connection file
include 'includes/dbConn.php';
include 'includes/dbData.php';
include 'index.php';
$results = getALLTestData($columnsOrder, $orderBy);
?>
    <center>
        <br />
        
<!-- Navigation -->
       <button class="btn btn-default" onClick="location.href='create.php'">Add New</button>
       <button class="btn btn-default" onclick="window.location.href='index.php'">Back</button>
       
<!--table to display the company names-->
        <table class="table">
            <thead>
                
            </thead>
         <?php 
foreach ($results as $row) {
    ?>