error: "Notice: Undefined index: page in C:\wamp\www\digi\admin\config\setup.php on line 8"
my code is:
<?php
#setup document
//host-username-password-database_name
$db = mysqli_connect('localhost','root','','dynamic');
if($_GET['page'] == "")
{$pg = 'home';}
else
{$pg = $_GET['page'];}
include('/functions/sandbox.php');
include('/functions/template.php');
$page_title = get_page_title($db,$pg);
?>
$_GET['page']
is not defined. To correctly check if it exists you should use isset()
:
if(isset($_GET['page'])) {$pg = 'home';} else {$pg = $_GET['page'];}