My original question was not clear enough. SO I'll attempt to give more information. I have a page that pulls data from a database using PHP (default.php). I built this page so that, based on the 'ID' - the content will change on the page. This is because I will have 100+ entries. I don't want to create 100 individual pages since the only the content will be changing.
Example:
https://mywebsite.com/default.php?id=xxxxx1
https://mywebsite.com/default.php?id=xxxxx2
https://mywebsite.com/default.php?id=xxxxx3
etc...
My table have columns for each row including: 'id' 'name' 'image' 'nominations' etc...
The 'default.php' page is a template that has the following code:
In the header:
<?php
include_once '../dbh.php';
$id = $_GET['id'];
?>
And in the body for each of the columns above:
<?php
$sql = "SELECT nominations FROM channel_info";
$result = mysqli_query($conn, "SELECT nominations FROM channel_info WHERE id='$id'");
$resultCheck = mysqli_num_rows($result);
if ($resultCheck > 0){
while ($row = mysqli_fetch_assoc($result)) {
echo $row['nominations'];
}
} else {
echo "<p>Sorry. No nominations listed. </p>";
}
?>
etc..
Currently the messages does NOT show when columns in the same row of the table is empty. How can I make this message show so that if it's empty it will display a message? This happens to all the data entries.
Empty column: [screenshot] prnt.sc/tkcw80 Page displa: [screenshot] http://prntscr.com/tk54iv