<?php

include 'zahrasql.php';

$sql = "
SELECT
    id,
    rsname,
    gene,
    allel,
    phenotype
FROM SNPs
WHERE phenotype LIKE '%Breast Cancer%'
ORDER BY rsname
";

$result = $conn->query($sql);

?>

<table class="table table-bordered table-striped">
    <thead>
        <tr>
            <th>RS ID</th>
            <th>Gene</th>
            <th>Allele</th>
            <th>Phenotype</th>
        </tr>
    </thead>
    <tbody>

<?php

if ($result && $result->num_rows > 0)
{
    while ($row = $result->fetch_assoc())
    {
        echo '<tr>';
        echo '<td>'.htmlspecialchars($row['rsname']).'</td>';
        echo '<td>'.htmlspecialchars($row['gene']).'</td>';
        echo '<td>'.htmlspecialchars($row['allel']).'</td>';
        echo '<td>'.htmlspecialchars($row['phenotype']).'</td>';
        echo '</tr>';
    }
}

?>

    </tbody>
</table>