Register script

I have made a register script but it doesnt seem to want to work! take a look at this… www.cubecity.co.uk/join.php, iposted the code below so you could probs sort it!

Register.php

<?php
####################
# Register an user #
####################

$f_name = stripslashes($_POST['f_name']);
$l_name = stripslashes($_POST['l_name']);
$username = stripslashes($_POST['username']);
$password = $_POST['password'];
$password2 = $_POST['password2'];
$email = $_POST['email'];
$error = 0; //no error right now

# Verify given information :
if(!$f_name || !$l_name|| !$username || !$password || !$password2 || !$email)
{
$error = "You didn't give all the informations!";
}

if($password != $password2)
{
$error = "The 2 passwords dont match !";
}


if (!$error) //no error, enter new member
{

# [ CONNECT TO YOUR DATABASE ]

# Create a date TYPE : 
$date = $year . "-" . $month . "-" . $day;

$SQL = mysql_query("INSERT INTO `auth` ( `userid` , `username` , `userpassword` , `f_name` , 

`l_name` , `email` , `region` , `date` , `gender` , `status` ) VALUES ('', '$username', 

'$password', '$f_name', '$l_name', '$email', '$region', '$date', '$Gender', '0')") or die 

('cannot create new member beacuse: ' . mysql_error());

$vkey = md5($f_name . $l_name . $email . $password);
$vlink = "http://www.cubecity.co.uk/validate.php?user={$username}&key={$vkey}";
$SQL = mysql_query("INSERT INTO `validate` ( `uname` , `key` ) VALUES ('{$username}', 

'{$vkey}')") or die ('cannot create new key beacuse: ' . mysql_error());

$message = "Click this link or paste it into your web browser
{$vlink}";

mail($email, "CubeCity Email Validation", $message,
     "From: noreply@{$_SERVER['SERVER_NAME']}
" .
     "Reply-To: noreply@{$_SERVER['SERVER_NAME']}
" .
     "X-Mailer: PHP/" . phpversion());

header("location: success.html");
}
?>

please reply as its stressing me out lol!