I have a login script coded in php and mysqli. upon submission and successful authentication it redirects to success.php to write sessions. my success page looks like this.
You need session_start() on all pages using $_SESSION
Also...are you sure that $_GET['id'] has a value in it?
And....is your form using POST or GET?
Ive made that silly mistake before , where form was using POST and I was retrieving variable with GET and getting frustrated. Just a possibility