function getNews() { require '../config.php'; //$sql = $connect->query("SELECT `title`, `text` FROM `content` WHERE `pageId`=". PAGE . " ORDER BY `id` DESC"); //channel/page id that are three digits are for threads and posts, and nav, homepage //PAGE == CHANNEL $sql = $connect->query("SELECT `title`, `text` FROM `content` WHERE `channelId`=" . PAGE . " ORDER BY `id` DESC"); while ($rows = $sql->fetch_object()) { echo "<article><header class='title'><h3 class='title'>" . $rows->title . "</h3></header>" . $rows->text . "</article>"; } getTrendingNews(); }
</aside> <section id="main_section" class="absoulte"><!-- meet of the website--> <h3 style="text-align: center;">Welcome to TV Stalkers</h3> <?php //getNews(); //caused an error ?> <article> <?php loadTrendingThreads(); ?> </article> <article> <header> <p class="newsHeader">News</p></header> <?php getTrendingNews(); ?> </article> </section> <aside id="trendingNow" class="about sideRight side_news general"><!-- id was side_news--> <h2>About</h2> <p>This site is for TV and Entertainment freaks. Post on our forum and get the latest news</p> <br> <div class="ad"> <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <ins class="adsbygoogle" style="display:inline-block;width:200px;height:250px" data-ad-client="ca-pub-1890640262821073" data-ad-slot="7418820142"></ins>