Código:
$query = mysql_query("SELECT username,password FROM user WHERE username = '$username'") or die(mysql_error()); $row = mysql_fetch_array($query); $_SESSION["s_username"] = $row['username'];