Hi friends, I am having problem with following code. I have actually made the whole code on same page (login.php) and the functions that i used in this code are in functions.php. Now this time it is showing the warning : Warning: Cannot modify header information - headers already sent by (output started at C:\Program Files\xampp\htdocs\fselection\login.php:1) in C:\Program Files\xampp\htdocs\fselection\login.php on line 19 The line 19 is header("Location: http://$host$uri/$extra"); Below is the list of code for login.php. The Server i am using is SunOS 5.10. <?php session_start(); require_once 'functions.php'; $UserName = $_POST['UserName']; $Password = $_POST['Password']; $host = $_SERVER['HTTP_HOST']; $uri = rtrim(dirname($_SERVER['PHP_SELF']), '/\\'); $extra = 'adminlogin.php'; $loc = "\"http://$host$uri/$extra\""; if ($_POST){ $error = login_check($_POST); if (trim ($error)=="") { $accesslevel = accessLevel($UserName); ?> <?php if ($accesslevel == "admin"){ $_SESSION["userid"] = login($_POST); header("Location: http://$host$uri/$extra"); exit(); } else if ($accesslevel == "user") { //echo "this is user"; $_SESSION["userid"] = login($_POST); header('Location: userlogin.php'); exit(); } } else { print "Error :$error"; } } ?> <BODY> <FORM id=form1 name=loginform method=post> <TABLE align=center> ........ ***********************Login Form Goes Here ********** nothing php Stuffs on this part </body> ANy help would be highly appreicated. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php