--- CBharadwaj <[EMAIL PROTECTED]> wrote: > In conection.php I have written. > SESSION_ START(); > > on successful login I am registering a session variable. > SESSION_REGISTER("userId");
Do this instead: session_start(); $_SESSION['userid'] = 'myuser'; > Header("Location: home.php"); Use an absolute URL: header('Location: http://example.org/home.php'); > Warning: Cannot modify header information - headers already sent by > (output started at E:\PHPMySql scripts\bugtrack\connection.php:3) > in E:\PHPMySql scripts\bugtrack\index.php on line 117 This call to header() on line 117 of index.php generates an error, because line 3 of connection.php generated output. Calls to header() must come prior to output. You can either rearrange your code or use output buffering: http://www.php.net/ob_start Hope that helps. Chris ===== Chris Shiflett - http://shiflett.org/ PHP Security - O'Reilly Coming Fall 2004 HTTP Developer's Handbook - Sams http://httphandbook.org/ PHP Community Site http://phpcommunity.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php