I'm trying to use $_SESSION for the first time.

When testing my script in EasyPHP everything works OK but when I upload I keep getting this message...

Cannot send session cookie - headers already sent

This is how I've used the code

page 1
PHP Code:
 session_start();
// defalt testing login
$username "myname";
$password "mypassword"
$_SESSION['username']= $username;
$_SESSION['password']= $password
page 2
PHP Code:

$username 
$_SESSION['username'];
$password $_SESSION['password'];

echo 
$password;
echo 
$username