I'm writing a forum, and my PHP code shows all the records for the selected column on a simple row.
Code:
<td bgcolor="#FAB1CA">
<?php
$link = mysqli_connect("xxxx", "xxx", "xxxx", "xxxxxx");
if ($link === false) {
die("ERROR: Could not connect. " . mysqli_connect_error());
}
if (isset($_SESSION['logged'])) {
$sql = "Select ID from forum_question ORDER by id DESC";
$result = mysqli_query($link, $sql);
while ($row = mysqli_fetch_assoc($result)) {
$show = $row['ID'];
print_r($show);
}
}
mysqli_close($link);
?>
</td>