Heyyyyy guys im trying to teach myself alongside this video im watching ive been following literally word for word got stuck a few times along way but managed to work out the problems myself,but this time im having no luck ive been stuck on this one for hours and hours

any help hugely appreciated!!!
So heres what ive got in code this is the activation.php page -
previous to this one, was the register.php page which successfully sent out the activation link to my email.
But when i fill in activation code/username and password it says the same freakin thing everytime
"You did not fill in the entire form" ive spell checked it myself and by using dw's spell checker and everythings spelt correct :s?
<?php $title = " Sarah - Activate Your Account"; ?>
<?php require("styles/top.php"); ?>
<div id='full'>
<?php
$getcode = $_GET['code'];
$form = "<form action='activate.php' method='post'>
<table>
<tr>
<td>Activate Code:</td>
<td><input type='text' name='code' value='$getcode' size='30'></td>
</tr>
<tr>
<td>Username:</td>
<td><input type='text' name'username'></td>
</tr>
<tr>
<td>Password:</td>
<td><input type='password' name='password'></td>
</tr>
<tr>
<td></td>
<td><input type='submit' name='submitbtn' value='activate'></td>
</tr>
</table>
</form>";
if ($_POST['submitbtn']){
$code = strip_tags($_POST['code']);
$username = strip_tags($_POST['username']);
$password = strip_tags($_POST['password']);
if ($code && $username && $password){
if (strlen($code) == 25){
$pass = md5(md5($password));
require("scripts/connect.php");
$query = mysql_query("SELECT * FROM users WHERE username='$username' AND password='$pass'");
$numrows = mysql_num_rows($query);
if ($numrows == 1) {
$row = mysql_fetch_assoc($query);
$dbcode = $row['code'];
if ($code == $dbcode){
mysql_query("UPDATE users SET active='1' WHERE username='$username'");
echo "Your account has beeen activated u may now login.<a href='login.php'>Click here to log in</a>";
}
else
echo "Your activation code incorrect $form";
}
else
echo "Your username and password are invalid $form";
}
else
echo "You have not supplied a valid code $form";
}
else
echo "You did not fill in the whole form $form";
}
else
echo "$form";
?>
</div>
<?php require("styles/bottom.php");?>