I have this written at the very first line on every page of my website.
include(\"restd.php\");
and restd.php contains the following lines
Do you actually set $_SESSION['id'] on a page...
What you are trying to do here is:
Do you actually do this in index.php?
session_start();
$_SESSION['id'] = something;