Mike,
I've been struggling with the exact same problem for over a week and finally cracked it!
My html editor inserts <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> in the first line of a page causing the "headers already sent" message. You just need to have the php code right at the start of the page before this and body tags etc.
Here's an example of a couple of pages to demo password collection:
Code for s1.php >>>
<?php
$username = "myname";
$password = "mypass";
session_register("username","password");
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<head><title>Untitled</title></head><body><h1>Session1</h1>
<?php
$session=session_id( );
echo "$session\n";
?>
<a href="s2.php">Go</a>
</body>
Code for s2.php >>>
<?php
session_start( );
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<head><title>Page 2</title></head><body>
<h1>Session</h1>
<?php
echo "User: $username Password: $password \n";
?>
</body>
p.s. this code assumes the session id is automatically appended to the link url. Hover your mouse over the hyper link to see if your server has done this.
Andy W