If this code:
$queryresutl = mysql_query($query) or Print(mysql_error());
prints out the sql error that will throw an error. Remember, no output can be printed until after the header is called. This will cause errors.
So if anywhere in the code above, IE connect.inc.php something is printed to the browser that will cause an error in the header redirect.
Best practice to do is if there is an error, eiither log it to the DB, kill the script or re-direct to an error page with that error message.
echo $user,$password;
That is the bad statement and is causing the error. Look at the line numbers. IE Line 9 (which was that echo statement). Usually those help to find the errors.
output started at /var/www/html/testweb/milad/Seagrant/include/login.inc.php:9) in /var/www/html/testweb/milad/Seagrant/include/login.inc.php on line 30
Line 30 is where the error was thrown, line 9 is where the output was started. That gives the exact location of the error.
--FrosT