Q: Unable to edit $_SESSION variables I have a very simple script that creates a user:
<?php
include 'mysqlserver.php';
session_start();



$con = mysql_connect($mysql_host, $mysql_username,$mysql_password);
if (!$con) {
die('Could not connect: ' . mysql_error());
}


mysql_select_db($mysql_db, $con);

$newuser = $_POST[username];
$newpassword = $_POST[password];
$confirmnewpassword = $_POST[confirmpassword];

if ($newpassword != $confirmnewpassword) {
die('Passwords do not match.');
}

if ($newuser == null) {
die('You need to choose a username!');
} elseif ($newpassword == null) {
die('You need to enter a password!');
}

$avail_query = mysql_query("SELECT * FROM users WHERE username='$newuser'");

$avail_numrows = mysql_num_rows($avail_query);

if ($avail_numrows != 0) {
die('That user already exists');
}


mysql_query("INSERT INTO users (username, password) 
VALUES ('$newuser', '$newpassword')");


$_SESSION['username'] == $newuser;

mysql_close($con);
?>

<script type="text/javascript">

function enterUCP(){
window.location = "/member.php"
}

</script>
</head>
<body onLoad="setTimeout('enterUCP()', 3000)">
Account created! Logging you in...
</body>

Originally, my script simply redirected you to the login page after creating an account. I've been trying to tweak it so you are logged in after the creation of an account.
For some reason, I cannot edit $_SESSION['username'] or any other session variables, even though I have started the session on line 3. I'm very confused, as some of my other PHP scripts properly manipulate $_SESSION variables, and I can't tell what's different in mine.
P.S. Please don't comment on the security of my system. It's probably terribly insecure, but I'm just writing for a prototype.
EDIT: Just to make this a little less useless of a question, can anyone find any serious security flaws here? 

A: Change:
$_SESSION['username'] == $newuser;

to:
$_SESSION['username'] = $newuser;

You're comparing instead of setting.

A: $_SESSION['username'] == $newuser;
remove the second = sign. 
$_SESSION['username'] = $newuser;


A: oh gosh :)
$_SESSION['username'] == $newuser;

double equal sign..put just one and it will work :)
$_SESSION['username'] = $newuser;


A: many people already answered your question, but I didn't want to put this in a comment.
First, you fix your code by changing
$_SESSION['username'] == $newuser;

to:
$_SESSION['username'] = $newuser;

IMPORTANT:
While you learn MySQLi or PDO, do this to your code
$newuser = mysql_real_escape_string($_POST[username]);

to protect yourself form SQL Injection
Make sure you do similar escaping for all of the input you're using in the query.
