Quickie: See the line "echo 'poo..... below? It's not echowing the $row['username'] and I'm not sure why.
$selection= addslashes(htmlentities($_POST['username']));
$sql = " SELECT * FROM webfriends WHERE username = '". mysql_real_escape_string($selection) ."' ";
if ($result = @mysql_query($sql)) {
//echo md5($_POST['password']);
//setcookie ("wfcookie", "you are logged in", time()+3600);
session_start();
$_SESSION['$selection'];
echo 'poo' . $row['username'];
echo $selection;
}
This bit, the 'poo' echoes (thats just there for testing reasons) but the $row['username'] doesn't. This is part of a larger script, if you feel the problems lays there, tell me and I'll post the lot.
echo 'poo' . $row['username'];
Thanks