Hello people,
Im new to php and basically, im trying to get certain information from a database to display only on the index page or if page=1 (Which is also the home page)
My SQL works as i can get the info to display on my all the pages but i only want to limit it to display on the home page. Heres the code
if($_GET['page'] == 1 || !isset($_GET['page'])) {
$mysql->get_News();
}
So basically i only want to run that function is page is 1 or page hasnt been set (ie the info will be displayed on index.php as well as index.php?page=1).
This does work kind of, but i get that error, if i turn error reporting off, error_reporting(0);, then it goes but i know this isnt a proper fix.
Any help would be appreciated, thanks