Hello i have this script.
if($_GET['page']) {
        if (isset($_GET['page']))
        $id = $db->escape_string($_GET['page']);
        if ($usersquery = $db->query("SELECT * FROM padges WHERE id ='$id' LIMIT 1"))
        $content = $usersquery->fetch_assoc();
    }
    if(!$_GET['page']) {
        if (isset($_GET['page']))
        $id = $db->escape_string($_GET['page']);
        if ($usersquery = $db->query("SELECT * FROM padges WHERE ID ='10' LIMIT 1"))
        $content = $usersquery->fetch_assoc();
    }
If i go to http://127.0.0.1/?page=10 i have no error. But if i go to http://127.0.0.1 i get this error.
Notice: Undefined index: page in /sites/ergotherapiewalcheren.nl/www/index.php on line 6 Notice: Undefined index: page in /sites/ergotherapiewalcheren.nl/www/index.php on line 12
How can i fix this error?
Tom Lammers
 
    